Skip to main content

Package to paginate pymongo queries

Project description

Pymongo Paginate

author: github.com/gabrielmrts/

Example


from pymongo_paginate import PyMongoPaginate

collection = db['your_pymongo_collection']
query = collection.find()

page = 1 ## Current page
pageSize = 10 ## Items per page

pagination = PyMongoPaginate(query, page, pageSize)
paginate = pagination.paginate()

---------------------------------------------------
Output -> dict {
            "page": 1,
            "page_count": 1,
            "item_count": 10,
            "items": []
        }
        

Project details


Release history Release notifications | RSS feed

This version

1.5

Download files

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

Source Distribution

pymongo-paginate-1.5.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file pymongo-paginate-1.5.tar.gz.

File metadata

  • Download URL: pymongo-paginate-1.5.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.3

File hashes

Hashes for pymongo-paginate-1.5.tar.gz
Algorithm Hash digest
SHA256 a18ab32bb1e917be4c6780202b6bb97e978d094a347713ca395fe4bbc43f2e66
MD5 25bcb78b3a632c00e8ce0054d68103e7
BLAKE2b-256 27e22bc48668b0054bae91615f49fc0253a221730dae2c2ab6b5ec25dbd12db7

See more details on using hashes here.

Supported by

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