--- id: webargs version: "8.7.1" license: unclear license_treatment: permissive maintenance: active --- # webargs — 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. License: permissive · Maintenance: active · Downloads: 3.9M/mo ## What it is and what it does webargs is a declarative HTTP request parsing and validation library built on top of marshmallow schemas. It lets you define what arguments your web endpoint expects—their names, types, and validation rules—then automatically extracts and validates them from incoming requests. Instead of manually checking request objects and writing validation code, you decorate your handler with a schema and webargs handles the rest, returning either validated data or raising validation errors. The library integrates with popular Python web frameworks including Flask, Django, Bottle, Tornado, Pyramid, Falcon, and aiohttp, so you use the same schema definitions across different frameworks. It supports extracting arguments from query strings, form data, JSON bodies, headers, and cookies. The underlying validation engine is marshmallow, so you get all of marshmallow's field types, custom validators, and error handling. Use it for: - Validate query parameters in a REST endpoint without writing manual type checks or try-catch blocks. - Parse and validate JSON request bodies in an API view using declarative field schemas. - Extract and coerce form data in a handler, with automatic error responses for invalid input. - Centralize request validation logic across multiple endpoints using reusable marshmallow schemas. - Build a REST API where request validation errors are automatically formatted and returned to clients. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. webargs parses and validates HTTP request arguments (query strings, form data, JSON bodies, headers) against declarative schemas, with built-in support for Flask, Django, Bottle, Tornado, Pyramid, Falcon, and aiohttp. Yes. webargs is a mature, actively maintained library in production/stable status with no known vulnerabilities, low install friction, and broad framework support. It solves a common problem—request validation—in a declarative, reusable way. Install it if you are building web APIs or handlers in any of the supported frameworks and want to avoid manual argument parsing and validation boilerplate. ## Install pip install webargs uv add webargs poetry add webargs ## Installing webargs Before you install: Low install friction; pure Python wheel with only three runtime dependencies (marshmallow, packaging, typing_extensions). Actively maintained with recent releases and no known vulnerabilities. License in practice: MIT licensed under permissive terms, allowing use in commercial and proprietary projects with minimal restrictions. Quickstart: pip install webargs from webargs import fields from webargs.flaskparser import use_args @use_args({"name": fields.Str(required=True)}, location="query") def index(args): return "Hello " + args["name"] Requires Python 3.9 or later; also requires the web framework you intend to use (e.g., Flask for the example above). Verify before relying: - Whether webargs automatically coerces types beyond what marshmallow provides by default. - Performance characteristics when validating large request payloads or deeply nested schemas. - Exact scope of framework support—whether all listed frameworks are equally maintained. - Whether all supported frameworks (Flask, Django, Bottle, Tornado, Pyramid, Falcon, aiohttp) are actively maintained in webargs. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 3.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags http request parsing validation, query parameter validation, declarative argument validation, web framework request parsing, marshmallow-based request validation, rest api argument parsing, form data validation, request-validation, rest-api, web-framework [View on SkillFed](https://skillfed.io/packages/webargs) · [View on PyPI](https://pypi.org/project/webargs/)