Skip to main content

Page info marshmallow schema for api

Project description

marshmallow_pageinfo

Page info marshmallow schema for api

Installation

pip install -U marshmallow_pageinfo

Example

from marshmallow_pageinfo import PAGE_INFO_SCHEMA


@controller.route('/', methods=['GET'])
def get_todo():
	page_info = PAGE_INFO_SCHEMA.load(request.args)
	pagination = todo_q.paginate(page_info['page'], page_info['per_page'])
	return {
		'todos': TODO_SCHEMA.dump(pagination.items),
		'pageInfo': PAGE_INFO_SCHEMA.dump(pagination),
	}

Project details


Download files

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

Source Distribution

marshmallow_pageinfo-1.0.0.tar.gz (1.5 kB view hashes)

Uploaded Source

Built Distribution

marshmallow_pageinfo-1.0.0-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

Supported by

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