skillfed

aiohttp-swagger3

validation for aiohttp swagger openAPI 3

aiohttp-swagger3 v0.10.0 101.8K downloads/30d#12,915 on PyPI61
Permissive license Apache 2 DORMANT released

What it is and what it does

aiohttp-swagger3 is a middleware layer for aiohttp applications that reads OpenAPI 3 specifications and automatically validates incoming HTTP requests against them. It can display interactive API documentation via Swagger UI, ReDoc, or RapiDoc, and optionally parse and validate request bodies, query parameters, headers, and path parameters according to the spec. Validation is enabled by default but can be disabled globally or per-route.

The package handles JSON and form-encoded request bodies, supports common JSON Schema constraints (required fields, enums, string formats like email and UUID, array/object validation), and integrates documentation generation into your aiohttp app startup. It requires five runtime dependencies—aiohttp, pyyaml, attrs, fastjsonschema, and rfc3339-validator—all of which are mature and commonly used.

Use it for:

  • Serve interactive API documentation alongside a running aiohttp service without writing separate docs.
  • Automatically validate incoming requests against an OpenAPI spec to catch malformed input early.
  • Enforce request schema compliance (required fields, type checking, format validation) without manual parsing code.
  • Provide multiple documentation UI options (Swagger UI, ReDoc, RapiDoc) to different teams or use cases.
  • Disable validation selectively on specific routes when spec-driven validation is not needed.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Integrates OpenAPI 3 documentation and request validation into aiohttp web applications, with support for multiple UI backends (Swagger UI, ReDoc, RapiDoc) and optional automatic request parsing.

Yes, if you are building aiohttp applications and want to integrate OpenAPI 3 documentation and request validation. The package is low-friction to install, permissively licensed, and supports current Python versions. However, note that maintenance is dormant—the last release was 549 days ago—so if you need active support or expect frequent updates to aiohttp or Python, verify compatibility before committing. No known security vulnerabilities.

Install

aiohttp-swagger3 on PyPI

pip

pip install aiohttp-swagger3

uv

uv add aiohttp-swagger3

poetry

poetry add aiohttp-swagger3

Installing aiohttp-swagger3

Before you install

Low install friction with a pure-Python wheel. Maintenance is dormant—last release was 549 days ago, though the repository remains active with a recent commit on 2025-02-11. The package supports current Python versions (3.9–3.13) and depends on stable, widely-used libraries.

License in practice

Licensed under Apache 2, a permissive license that allows commercial and private use with minimal restrictions, making it suitable for most projects.

Quickstart

pip install aiohttp-swagger3

from aiohttp import web
from aiohttp_swagger3 import SwaggerDocs, SwaggerInfo

app = web.Application()
swagger = SwaggerDocs(app, info=SwaggerInfo(title="API", version="1.0.0"))
swagger.add_routes([web.get("/pets/{pet_id}", handler)])
web.run_app(app)

Requires Python >= 3.9 and aiohttp >= 3.8.0.

Verify before relying

  • Whether validation performance is acceptable for high-throughput APIs.
  • Current state of support for multipart/form-data or other content types beyond application/json and application/x-www-form-urlencoded.
  • Whether dormant maintenance status affects long-term compatibility with future aiohttp releases.

Package facts

License Apache 2 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 5 — aiohttp, pyyaml, attrs, fastjsonschema, rfc3339-validator
Maintenance dormant — 549 days since the last release
Last repo commit
First released
Downloads 101,801/month — #12,915 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiohttp_swagger3-0.10.0-py3-none-any.whl

Development Status :: 4 - BetaFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: POSIXProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP

Tags

openapi 3 aiohttp validationswagger documentation aiohttpasync http api validationopenapi request parsingaiohttp swagger ui integration
openapi-validationasync-web-framework

More WWW/HTTP packages