Skip to main content

Declarative parsing and validation of HTTP request objects, with built-in support for popular web frameworks, including Flask, Django, Bottle, Tornado, Pyramid, Falcon, and aiohttp.

Project description

PyPI package Build status Documentation marshmallow 3|4 compatible

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

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

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

app = Flask(__name__)


@app.route("/")
@use_args({"name": fields.Str(required=True)}, location="query")
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

Documentation

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

Support webargs

webargs is maintained by a group of volunteers. If you’d like to support the future of the project, please consider contributing to our Open Collective:

Donate to our collective

Professional Support

Professionally-supported webargs is available through the Tidelift Subscription.

Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional-grade assurances from the experts who know it best, while seamlessly integrating with existing tools. [Get professional support]

Get supported marshmallow with Tidelift

Security Contact Information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

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

Uploaded Source

Built Distribution

webargs-8.7.0-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: webargs-8.7.0.tar.gz
  • Upload date:
  • Size: 96.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for webargs-8.7.0.tar.gz
Algorithm Hash digest
SHA256 0c617dec19ed4f1ff6b247cd73855e949d87052d71900938b71f0cafd92f191b
MD5 71f6562e7f359d4b4383f6162f31d32a
BLAKE2b-256 a802d27619cb81e0e136e27276e8bd48c5ebb38272b0920ce43da0f61c598879

See more details on using hashes here.

Provenance

The following attestation bundles were made for webargs-8.7.0.tar.gz:

Publisher: build-release.yml on marshmallow-code/webargs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webargs-8.7.0-py3-none-any.whl.

File metadata

  • Download URL: webargs-8.7.0-py3-none-any.whl
  • Upload date:
  • Size: 31.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for webargs-8.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4571de9ff5aac98ef528d9cecd7dbc0e05c0e9149e8293a01d1d1398abfcf780
MD5 eb163291c127e44393a08c3ac009c24f
BLAKE2b-256 263f0f68665037bc10d87cf18bcd094a53ad6496ffe44faff721481060fd9149

See more details on using hashes here.

Provenance

The following attestation bundles were made for webargs-8.7.0-py3-none-any.whl:

Publisher: build-release.yml on marshmallow-code/webargs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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