Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Falcon requests validation against OpenAPI (Swagger) schema

Project Description

Falguard is a Python library that provides request validation helpers for Falcon web framework. Falguard relies on Yelp’s bravado-core library.


  • Validation of OpenAPI (Swagger) schema
  • Error serialization compliant with JSON:API specification
  • Validator may be used either as a hook or a middleware component


Instantiate Validator with the path to OpenAPI specification…

import falguard

validator = falguard.Validator('spec.json')

…and use it as the hook on the responder…

class Resource:

    def on_get(self, request, response, **validated):

…or the hook on the whole resource…

class Resource:

…or globally, as the middleware component.

import falcon

api = falcon.API(middleware=validator)

All validated parameters (path, query, body) are injected back to the responder so it MUST accept relevant number of arguments, eg.

class Resource:

    def on_put(self, request, response, resource_id, data):

    def on_post(self, request, response, **validated):

Release History

This version
History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(2.8 kB) Copy SHA256 Hash SHA256
Source Jul 16, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting