API Star Pagination
- Version: 0.4.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.4.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 | |
|---|---|---|---|---|
| apistar-pagination-0.4.0.tar.gz | 15.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| apistar_pagination-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.9 kB
Release files / apistar-pagination-0.4.0.tar.gz
| Download URL | apistar-pagination-0.4.0.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3862ebb230065b536c80cbe5573241059d382215ee84d6cb1afe9e212c065725
|
|
BLAKE2b-256 checksum How to use checksums |
2b9c637eb7b0be63d85921280a90639dbb92be3692ee0b81c551240aef772acb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.11.5 CPython/3.7.0 Linux/4.18.9-arch1-1-ARCH
|
Release files / apistar_pagination-0.4.0-py3-none-any.whl
| Download URL | apistar_pagination-0.4.0-py3-none-any.whl |
|---|---|
| Size | 44.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2df4abb0751f40d1b2a79e491e9210dc7e6b2302e94754765d761e4124828a1
|
|
BLAKE2b-256 checksum How to use checksums |
bef4f5250f95f4993f0d604a378f28dc781f3d4404b66bb0674e0d8c89f3b4ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.11.5 CPython/3.7.0 Linux/4.18.9-arch1-1-ARCH
|
Security for apistar-pagination 0.4.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.