API Star Pagination
- Version: 0.3.0
- Status: Production/Stable
- Author: José Antonio Perdiguero López
Pagination tools for API Star.
Features
- Page number pagination.
- Limit-offset pagination.
Quick start
Install API star Pagination:
pip install apistar-pagination
Use paginated response in your views:
Page number pagination
from apistar_pagination import PageNumberResponse
def page_number(page: http.QueryParam, page_size: http.QueryParam) -> typing.List[int]:
collection = range(10) # Get your whole collection instead of a list of numbers
return PageNumberResponse(page=page, page_size=page_size, content=collection)
Limit-offset pagination
from apistar_pagination import LimitOffsetResponse
def limit_offset(offset: http.QueryParam, limit: http.QueryParam) -> typing.List[int]:
collection = range(10) # Get your whole collection instead of a list of numbers
return LimitOffsetResponse(offset=offset, limit=limit, content=collection)
Metadata
Release files for apistar-pagination 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apistar-pagination-0.3.0.tar.gz | 14.9 kB | Without provenance | Details for apistar-pagination-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apistar_pagination-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for apistar_pagination-0.3.0-py3-none-any.whl |
Total release size: 55.5 kB
Release files / apistar-pagination-0.3.0.tar.gz
| Download URL | apistar-pagination-0.3.0.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
202049ba6823e9ed96c6fd22f2b74c681df1a95c596671df9ef0e24c61fc5889
|
|
BLAKE2b-256 checksum How to use checksums |
4d465fbff7ecf8daba3b96016579b0ac9cde18480b5b8368e85ff45e38fcb0ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / apistar_pagination-0.3.0-py3-none-any.whl
| Download URL | apistar_pagination-0.3.0-py3-none-any.whl |
|---|---|
| Size | 40.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fed0128a8b1945eab3d068f791eaeed41db2d86b4f109b16271b1438b042958a
|
|
BLAKE2b-256 checksum How to use checksums |
499bea162ccc268ebf96b065e643258f29c7832d4cfebbfa0da85fb0571dabb6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for apistar-pagination 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.