Replies: 5 comments
-
I feel really bad about advertising my own projects in other project's issue threads but you can take a look at graceful. It's a toolkit for building resources for falcon. It can be used even if you do not want to use it for every resource in your code. It already comes with two predefined parameters for pagination ( |
Beta Was this translation helpful? Give feedback.
-
@bcthomas I've come up with this very simple solution https://github.com/etalab/ban/blob/master/ban/http/resources.py#L45 |
Beta Was this translation helpful? Give feedback.
-
@swistakm thanks. interesting and well designed toolkit. I will have a look. @yohanboniface I really like the idea of cursor-based pagination. I will be interested in how you implement. I read a good bit about the disqus cursor system in their API. Seems like a good strategy. |
Beta Was this translation helpful? Give feedback.
-
👍 for this one, @yohanboniface your BaseCollection thing will have to do for now thanks for the tip! |
Beta Was this translation helpful? Give feedback.
-
I'm going to convert this issue to a discussion, since it's focused on a specific area in which Falcon doesn't come with batteries included. Documenting general ORM integration is tracked in #1407. |
Beta Was this translation helpful? Give feedback.
-
I have a nice little falcon-based API in the works, tied up to a database using peewee. I have one model that has thousands of children and I'd like to paginate the responses for it.
Does anyone have any example code they could share on implementing pagination in falcon or suggestions for a proper design?
Beta Was this translation helpful? Give feedback.
All reactions