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

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.4.

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

This version

3.0.2

Download files

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

Source Distribution

webargs-3.0.2.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webargs-3.0.2-py2.py3-none-any.whl (24.0 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for webargs-3.0.2.tar.gz
Algorithm Hash digest
SHA256 7f76cea1989391480198840ef9cabb8041db7129e0a58f15e6962b92d4938a17
MD5 ba1c77c32cb3830a9d1e9e6a611fc5cf
BLAKE2b-256 24b8fae18af9207cb9c3a1555e74482fa27602bfd23033dc7155b27b27a356b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for webargs-3.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a4701fd0af6cc398005584865cd43a914e319d7a29942f757cd9dbc53e2a39ec
MD5 e95b6c6faa3d4cc22f0fcb69d1343924
BLAKE2b-256 559a7a3968356a932c0672635de0128a5c011871f56f7f9a521e0d0c16f22974

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page