Skip to main content

API Star Pagination

Build Status codecov PyPI version

  • 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)

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)

Source distribution for apistar-pagination 0.3.0
File Size Uploaded
apistar-pagination-0.3.0.tar.gz 14.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apistar-pagination 0.3.0
File Interpreter ABI Platform
apistar_pagination-0.3.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

0.4.0

2 release files

This release

0.3.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page