Skip to main content

A Django Ninja extension for cursor-based pagination.

Project description

django-ninja-cursor-pagination

This library adds a new pagination class for use with django-ninja which supports cursor-based pagination.

Installation

pip install django-ninja-cursor-pagination

Usage

from ninja.pagination import paginate
from ninja_cursor_pagination import CursorPagination

@router.get("/things", response=list[ThingSchema])
@paginate(CursorPagination)
def list_things(request):
    return Thing.objects.order_by("title")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_ninja_cursor_pagination-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django_ninja_cursor_pagination-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django_ninja_cursor_pagination-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dd0e67abc58db3f7638cdbeaf95d64780fe7eb8efd7bac8b0d03cdd2d3f9c91d
MD5 a402c94a388532fa708c6a13d89cdb9e
BLAKE2b-256 5053a47b21deef6b755369d7fc483ee7d51c058de34eb7d0ac33005e27ffccce

See more details on using hashes here.

File details

Details for the file django_ninja_cursor_pagination-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_ninja_cursor_pagination-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1f35f55d419086f18c28e6bdc007c2c4b2f936354990dfabab8daf19da1d8b6c
MD5 2b28dde63b043860db25779465a52d00
BLAKE2b-256 d482e5175c26cd41e2db9093458bfdf3e191648da4843a825c95e1b66e9368e1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page