Skip to main content

Python object paginator

Project description

Example of usage:

from paginator import core

object_list = [obj_1, obj_2, obj_n...]

paginator = core.paginate(object_list, page_limit=50, start_page=0)

Get current page response:

paginator.response

When calling next or previous page you can access new page data with paginator.response

Get next page:

paginator.get_next()

Get previous page:

paginator.get_previous()

Get response of requested page number:

paginator.get_page_response(page_number=0)

Total pages:

paginator.total_pages

Count objects:

paginator.total

Iterating over paginator pages

for page in paginator:
...

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

python-paginator-0.0.2.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

python_paginator-0.0.2-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file python-paginator-0.0.2.tar.gz.

File metadata

  • Download URL: python-paginator-0.0.2.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for python-paginator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 7c28b97a262884fec1423243b139d828f84249fe78e09aada39ec2277b3e98cb
MD5 e8e4b8af4d20a475bcbe738775e1df3f
BLAKE2b-256 c2c701aa422f37f3aa88b8f4bde30d9cee1a9b2854a1a17b1315bcb56619f269

See more details on using hashes here.

File details

Details for the file python_paginator-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_paginator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed08cf14b13e1da49c03142703cd663915a9c8a28736a0a2b9e0e55c05f9d1cd
MD5 b3a420f547484d36e15ca027c372759c
BLAKE2b-256 ef0347e3394dc7c2a528191f6067f055e4cd3f54bb8713ba7b4f0da3fb7a7b04

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