Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pagination #56

Closed
zeke opened this issue Dec 9, 2022 · 4 comments
Closed

Pagination #56

zeke opened this issue Dec 9, 2022 · 4 comments

Comments

@zeke
Copy link
Member

zeke commented Dec 9, 2022

The README says "You can list all the predictions you've run" with replicate.predictions.list(), but it's actually just the last 100.

TODO: https://github.com/replicate/replicate-python/blob/b5c94939de581ff2bb428da1e33dc77240e380b8/replicate/prediction.py

API docs: https://replicate.com/docs/reference/http#get-predictions

@zeke
Copy link
Member Author

zeke commented Dec 9, 2022

Stripe's Python client makes this really nice: https://stripe.com/docs/api/pagination/auto?lang=python

@bfirsh
Copy link
Member

bfirsh commented Dec 13, 2022

I think list() should just return an iterator rather than have a separate API for it. Why would you ever not want to paginate?

@zeke
Copy link
Member Author

zeke commented Dec 13, 2022

Yeah good point. I just want to be able to get all the things. If list() makes that possible by default, great!

@mattt
Copy link
Contributor

mattt commented Nov 7, 2023

Resolved by #189

@mattt mattt closed this as completed Nov 7, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants