🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

pagilist

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pagilist

List pagination by page or limit,offset

0.0.2
Maintainers
1

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]

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts