Skip to main content

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

Project description

https://badge.fury.io/py/webargs.png https://travis-ci.org/sloria/webargs.png?branch=pypi

Homepage: https://webargs.readthedocs.org/

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

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.6 or >= 3.3.

Documentation

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

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-0.16.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

webargs-0.16.0-py2.py3-none-any.whl (18.8 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

  • Download URL: webargs-0.16.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for webargs-0.16.0.tar.gz
Algorithm Hash digest
SHA256 c1ace4994aaf370639b25454427a6657466d01705608b63bbde306e5d6d4d90b
MD5 beebe261040e8f674237e4f3ba17939e
BLAKE2b-256 a219a8f2225e0a89b3cc0dff9fd43a6f401adae641a9a36eddba80c3f4ac073b

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for webargs-0.16.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 13d1b5679352a28b57e74bd62e674ff5eb3f01ef38d7d3835d7c26dec0191732
MD5 a05ad8ff2c334fb4abf05caf43b5bb60
BLAKE2b-256 cf5abf2b8826c501f4a4d7b13f0246c426cdb36a710ab22100d8d66be3b8ebec

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