Navigation

  • index
  • modules |
  • next |
  • previous |
  • nickw-flask-utils 0.0.0.dev0 documentation »

Pagination¶

API¶

flask_utils.pagination.paginated(basequery, schema_type, offset=None, limit=None)¶

Paginate a sqlalchemy query

Parameters:
  • basequery – The base query to be iterated upon
  • schema_type – The Marshmallow schema to dump data with
  • offset – (Optional) The offset into the data. If omitted it will be read from the query string in the ?offset= argument. If not query string, defaults to 0.
  • limit – (Optional) The maximum results per page. If omitted it will be read from the query string in the ?limit= argument. If not query string, defaults to 20.
Returns:

The page’s data in a namedtuple form (data=, errors=)

Table of Contents

  • Celery
  • Config
  • Deployment Release
  • Pagination
  • Restful
  • Sentry
  • Testing
  • Token Auth
  • Webargs

This Page

  • Show Source

Quick search

© Copyright 2017, Nicholas Whyte. Created using Sphinx 1.8.6.