Skip to main content

Validation for sanic endpoints

Project description


PyPI PyPI - Python Version Build Status Read the Docs

sanic-validation is an extension to sanic that simplifies validating request data.


pip install sanic-validation


Documentation is available at ReadTheDocs.

Usage example

from sanic import Sanic
from sanic.response import json
from sanic_validation import validate_args

app = Sanic('demo-app')

schema = {'name': {'type': 'string', 'required': True}}

async def hello(request):
    return json({'message': 'Hello ' + request.args['name']})'')

Building the documentation


  • Python
  • Sphinx
  • make


python install
cd docs
make html

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

sanic-validation-0.5.1.tar.gz (15.6 kB view hashes)

Uploaded Source

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