{ "info": { "author": "Remy Gwaramadze", "author_email": "remy@gwaramadze.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "Falguard |travis| |codecov| |python-versions|\n=============================================\n\nFalguard is a Python library that provides request validation helpers for\n`Falcon `_ web framework. Falguard relies on Yelp's `bravado-core `_ library.\n\nFeatures\n--------\n* Validation of `OpenAPI (Swagger) `_ schema\n* Error serialization compliant with `JSON:API `_ specification\n* Validator may be used either as a hook or a middleware component\n\nInstallation\n------------\n.. code:: bash\n\n $ pip install falguard\n\nUsage\n-----\nInstantiate Validator with the path to OpenAPI specification (both json and yaml are supported)...\n\n.. code:: python\n\n import falguard\n\n validator = falguard.Validator('spec.json')\n\n\n...and use it as the hook on the responder...\n\n.. code:: python\n\n class Resource:\n\n @falcon.before(validator)\n def on_get(self, request, response, **validated):\n pass\n\n\n...or the hook on the whole resource...\n\n.. code:: python\n\n @falcon.before(validator)\n class Resource:\n pass\n\n\n...or globally, as the middleware component.\n\n.. code:: python\n\n import falcon\n\n api = falcon.API(middleware=validator)\n\n\nAll validated parameters (path, query, body) are injected back to the responder\nso it MUST accept relevant number of arguments, eg.\n\n.. code:: python\n\n class Resource:\n\n def on_put(self, request, response, resource_id, data):\n pass\n\n def on_post(self, request, response, **validated):\n pass\n\n.. |travis| image:: https://travis-ci.org/gwaramadze/falguard.svg\n :target: https://travis-ci.org/gwaramadze/falguard\n\n.. |codecov| image:: https://codecov.io/gh/gwaramadze/falguard/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/gwaramadze/falguard\n\n.. |python-versions| image:: https://img.shields.io/pypi/pyversions/falguard.svg\n :target: https://pypi.org/project/falguard/\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gwaramadze/falguard", "keywords": "", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "falguard", "package_url": "https://pypi.org/project/falguard/", "platform": "", "project_url": "https://pypi.org/project/falguard/", "project_urls": { "Homepage": "https://github.com/gwaramadze/falguard" }, "release_url": "https://pypi.org/project/falguard/0.3/", "requires_dist": [ "falcon (<=2.0.0,>=1.1.0)", "bravado-core (<=6.0.0,>=4.6.0)", "pytest ; extra == 'tests'", "pytest-cov ; extra == 'tests'", "pytest-flake8 ; extra == 'tests'", "pytest-pylint ; extra == 'tests'", "webtest ; extra == 'tests'" ], "requires_python": "", "summary": "Falcon requests validation against OpenAPI (Swagger) schema", "version": "0.3" }, "last_serial": 4832356, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "3fc32863a2206ad42122378b97b38679", "sha256": "c5f820de0fdb814ebeda9bccff4a13fadc06d622a07d39dd8cf34f0ce9784bb8" }, "downloads": -1, "filename": "falguard-0.1.tar.gz", "has_sig": false, "md5_digest": "3fc32863a2206ad42122378b97b38679", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2748, "upload_time": "2017-07-16T09:09:43", "url": "https://files.pythonhosted.org/packages/cf/ba/21d28a7ebfd86c2067911c1f2e8ee881c622000ed36ac54f11a713bff3bc/falguard-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "400f78c22d067b5023b643425b4c485a", "sha256": "55976b3de9650ed8768767d0164b9c31dc4fb96cfaf0084b5d56a798e8993ce2" }, "downloads": -1, "filename": "falguard-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "400f78c22d067b5023b643425b4c485a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3753, "upload_time": "2018-12-29T14:43:43", "url": "https://files.pythonhosted.org/packages/19/39/a3b52e2a678187bd53ae551dfb72478965d7528864061a3542008411b824/falguard-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d195a4a2f63d7f968b833e102fad5fbc", "sha256": "d6d7defc360c89d7b291825eb5904b067e1b8d12efd0f13a3088fcca0912b63a" }, "downloads": -1, "filename": "falguard-0.2.tar.gz", "has_sig": false, "md5_digest": "d195a4a2f63d7f968b833e102fad5fbc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3113, "upload_time": "2018-12-29T14:43:44", "url": "https://files.pythonhosted.org/packages/4a/45/34de2d01566c9a1f4ab70e756947e3ba6769c7d16e057f45602d5d96e2cb/falguard-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "93a91461bb828918d9cb8588f8fbe2b3", "sha256": "c6921d27e69e8077e16e5dd67dbd39fc8683190c8183dab6fc7bcf5013a6df13" }, "downloads": -1, "filename": "falguard-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "93a91461bb828918d9cb8588f8fbe2b3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3982, "upload_time": "2019-02-17T21:07:39", "url": "https://files.pythonhosted.org/packages/0d/3c/98b743ea38c213757d3dbfeabab0544090ffbf855a3de2bd33a6dc5a6a20/falguard-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e06e5b5a1fab49e7394012dee5cb50ad", "sha256": "7cee5dbc4a73011375683bc7954e46d72a6764abfc61f6d934d2eb55a9c0131e" }, "downloads": -1, "filename": "falguard-0.3.tar.gz", "has_sig": false, "md5_digest": "e06e5b5a1fab49e7394012dee5cb50ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3348, "upload_time": "2019-02-17T21:13:29", "url": "https://files.pythonhosted.org/packages/7d/25/b15631651c4b356b30d0f8073c5a680a6f6faebdd4da855396c0ce458656/falguard-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "93a91461bb828918d9cb8588f8fbe2b3", "sha256": "c6921d27e69e8077e16e5dd67dbd39fc8683190c8183dab6fc7bcf5013a6df13" }, "downloads": -1, "filename": "falguard-0.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "93a91461bb828918d9cb8588f8fbe2b3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3982, "upload_time": "2019-02-17T21:07:39", "url": "https://files.pythonhosted.org/packages/0d/3c/98b743ea38c213757d3dbfeabab0544090ffbf855a3de2bd33a6dc5a6a20/falguard-0.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e06e5b5a1fab49e7394012dee5cb50ad", "sha256": "7cee5dbc4a73011375683bc7954e46d72a6764abfc61f6d934d2eb55a9c0131e" }, "downloads": -1, "filename": "falguard-0.3.tar.gz", "has_sig": false, "md5_digest": "e06e5b5a1fab49e7394012dee5cb50ad", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3348, "upload_time": "2019-02-17T21:13:29", "url": "https://files.pythonhosted.org/packages/7d/25/b15631651c4b356b30d0f8073c5a680a6f6faebdd4da855396c0ce458656/falguard-0.3.tar.gz" } ] }