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, and Pyramid.

Project description

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

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, and Pyramid.

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

app = Flask(__name__)

hello_args = {
    'name': Arg(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.10.0.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

webargs-0.10.0-py2.py3-none-any.whl (17.5 kB view details)

Uploaded Python 2 Python 3

File details

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

File metadata

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

File hashes

Hashes for webargs-0.10.0.tar.gz
Algorithm Hash digest
SHA256 97e610055c2abe8d34de65d7ce91232ef71499e3db3acd5dc3dc613d0584c887
MD5 4bcaa0280fa5f5d3bb68a281261387a6
BLAKE2b-256 d5569aedf38a14973c53e4f79b16d2788809974aaca71c513b2c1652d1922f88

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for webargs-0.10.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9009f66193cfb7c11a3dfc27d7b7871b6af72cfe67acf9dc841937c6ff632c96
MD5 6a06350bd277f0ad66aa0b84053dc464
BLAKE2b-256 b0542fd595ca8d9f7bb97379852f4846bd83318f8e27625fbf8f13faf0a81e9c

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