List pagination by page or limit,offset
Project description
Pagilist
Simple module to paginate lists using page or limit/offset. Source code available at Github.
Usage
page = 0 #first page limit = 3 #three items per page page_sample = paginate(list, page, limit) ##OR## offset = 3 #start from the fourth element on list page_offset = paginate_offset(list, offset, 5) #get from the fourth element with a limit of 5 elements print(page_sample) #outputs [1, 2, 3] print(page_offset) #outputs [4, 5, 6, 7, 8]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pagilist-0.0.2.tar.gz
(1.4 kB
view details)
Built Distribution
File details
Details for the file pagilist-0.0.2.tar.gz
.
File metadata
- Download URL: pagilist-0.0.2.tar.gz
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0316232248fd1d3a15b2fb2aa06f6e57eeed7c57d6db0bb1cba78746c1b7aedc |
|
MD5 | ccf2ea2931c91872ee5741c55c321410 |
|
BLAKE2b-256 | 56a5913470c1100faa1f5512d19a3975d34e92b8e00763de78a10a48200999e4 |
File details
Details for the file pagilist-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: pagilist-0.0.2-py3-none-any.whl
- Upload date:
- Size: 1.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d22a6478321f17e955f3efad422d88d43ca7b546046f012f262f87c880d47574 |
|
MD5 | c6cd5fd4e89051fba8b2732f112ce62b |
|
BLAKE2b-256 | f58dc32cee309c59a56e0c3e875110673c5b950384a92d185f39dc7d561b72b0 |