Skip and Limit for pagination for a Mongo aggregate
问题 I am working on pagination in flask(Python framework) using flask-paginate (just for ref) I am able to achieve pagination for just a find query as below: from flask_paginate import Pagination from flask_paginate import get_page_args def starting_with_letter(letter): page, per_page, offset = get_page_args() collection_name=letter.lower()+'_collection' words=db[collection_name] data_db=words.find() data=data_db.limit(per_page).skip(offset) '''Here I have achieved the limit and skip'''