cloudflare / cloudflare/cloudflare-python

`client.pages.projects.list` returns a paginated list of `Deployment`s instead of `Project`s

オープン
#2,692 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
506
フォーク
148
平均マージ
3時間 15分
マージ済み PR(30日)
1

説明

### Confirm this is a Python library issue and not an underlying Cloudflare API issue.

- [x] This is an issue with the Python library

### Describe the bug

As the title says, `client.pages.projects.list` returns a paginated list of `Deployment`s instead of `Project`s.

### To Reproduce

Assertions should pass, but they fail.

```python
import cloudflare
from pydantic import BaseModel

class Config(BaseModel):
account_id: str
api_token: str

with open("config.json", "r") as f:
config = Config.model_validate_json(f.read())

client = cloudflare.Cloudflare(api_token=config.api_token)
for project in client.pages.projects.list(account_id=config.account_id):
assert not isinstance(project, cloudflare.types.pages.deployment.Deployment)
assert isinstance(project, cloudflare.types.pages.project.Project)
break
```

### Code snippets

```Python

```

### OS

Ubuntu 24.04

### Python version

3.12.3

### Library version

4.3.1

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。