Pagination on zero_trust.devices.list only returns 1 page
@vaishakdinesh がすでに取り組んでいます。
2025年6月30日 から。
評価
この issue はまだ評価されていません。
説明
Confirm this is a Python library issue and not an underlying Cloudflare API issue.
- This is an issue with the Python library
Describe the bug
When using either the automatic pagination or the "has_next_page" manual pagination on the client.zero_trust.devices.list( endpoint, only 1 page is returned (20 devices).
The "has_next_page" function returns False.
This applies to async and non-async calls.
I can confirm that I have much more than 20 devices on the account, and the old API used to fetch them all.
This has been present in the lib for a while (months). I tried this lib out a while ago and found a few issues, but didn't get to reporting them then. I thought I'd mention that in case it helps narrow the issue down.
To Reproduce
- Try fetch all devices, either by automatic pagination or manual.
- Append to list
- Check length of list to find it's too short.
Code snippets
from cloudflare import Cloudflare
client = Cloudflare()
all_devices = []
for device in client.zero_trust.devices.list(account_id=***):
all_devices.append(device)
len(all_devices)
# In my case, outputs 20 instead of 91
OS
Ubuntu 24.04
Python version
3.12.3
Library version
v4.1.0
- 主要言語
- Python
- スター
- 509
- フォーク
- 150
- 平均マージ
- 3時間 15分
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
cloudflare/cloudflare-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
cloudflare/cloudflare-python#2747 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
cloudflare/cloudflare-python#2718 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
cloudflare/cloudflare-python#2692 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
cloudflare/cloudflare-python#2679 · コメント 4 件 · リアクション 5 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
cloudflare/cloudflare-python#2745 · コメント 1 件 ·
cloudflare/cloudflare-python の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100