Page size as paginate() argument
See original GitHub issueThe idea is to set page size in paginate() function. Maybe as an element of params. So we could get this value from router argument or use some default size.
Something like this:
@router.get('', response_model=Page[ItemList])
async def get_item_list(page_size: int = 20):
return paginate(items, page_size)
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
REST api pagination: make page-size a parameter ...
Personally, I would simply document a maximum page size, and anything larger than that is simply treated as the maximum.
Read more >What do "pageSize" & "maxPageSize" parameters mean ...
The "pagesize" in the yml is a reference to the size of the page displayed in related to pagination. This allows for large...
Read more >pageSize, page - Veeam Backup REST API Reference
The pageSize and page query parameters let you control pagination. ... Using the pageSize parameter, you can define the number of items to...
Read more >Paginators — Boto3 Docs 1.26.32 documentation - AWS
This argument if useful for resuming pagination from a previous token or starting pagination at a known position. PageSize.
Read more >Using AWS CLI pagination options
By default, the AWS CLI uses a page size determined by the individual service and retrieves all available items. ... How to use...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can do it by passing
size
parameter in case ofPage
orlimit
parameter in case ofLimitOffsetPage
.For instance:
No worries)