Skip to main content

A friendly library for parsing and validating HTTP request arguments, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.

Project description

https://badge.fury.io/py/webargs.svg https://travis-ci.org/sloria/webargs.svg?branch=pypi marshmallow 3 compatible code style: black

Homepage: https://webargs.readthedocs.io/

webargs is a Python library for parsing and validating HTTP request arguments, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.

from flask import Flask
from webargs import fields
from webargs.flaskparser import use_args

app = Flask(__name__)

hello_args = {"name": fields.Str(required=True)}


@app.route("/")
@use_args(hello_args)
def index(args):
    return "Hello " + args["name"]


if __name__ == "__main__":
    app.run()

# curl http://localhost:5000/\?name\='World'
# Hello World

Install

pip install -U webargs

webargs supports Python >= 2.7 or >= 3.5.

Documentation

Full documentation is available at https://webargs.readthedocs.io/.

License

MIT licensed. See the LICENSE file for more details.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

webargs-4.1.0.tar.gz (26.8 kB view details)

Uploaded Source

Built Distribution

webargs-4.1.0-py2.py3-none-any.whl (24.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file webargs-4.1.0.tar.gz.

File metadata

  • Download URL: webargs-4.1.0.tar.gz
  • Upload date:
  • Size: 26.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for webargs-4.1.0.tar.gz
Algorithm Hash digest
SHA256 aead0d490de69c93ad880eec64bcbe7c63edc8f6441392d3d36ad5dc1670b8a9
MD5 fbf285be125b14ceece1df15e99c57e2
BLAKE2b-256 9af56bccf7be7ebcfc45e1478d3e7f7dda78dcd7968660ecbc16eb1700653b40

See more details on using hashes here.

Provenance

File details

Details for the file webargs-4.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: webargs-4.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.3.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3

File hashes

Hashes for webargs-4.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4472018d2cd6796244d8db44a56c552e70e8abcd1f4b3a5988c7b2eba665e7c6
MD5 5ddc06b119070cef26a96518b5eeb85d
BLAKE2b-256 28fe486521c5df75657c0e6f2d7f2c79726c1e5282623ba3dee543c4b1ec74a6

See more details on using hashes here.

Provenance

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