Install & Compatibility
Where this runs
tested against v0.10.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.912s · 34.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 4.2s · import 0.840s · 37MB
34MB installed
● package 34MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SwaggerDocs
✓ from aiohttp_swagger3 import SwaggerDocs
Main class to set up Swagger documentation
swagger_doc
✓ from aiohttp_swagger3 import swagger_doc
✗ from aiohttp_swagger3 import swagger_docs
Decorator for adding YAML docs; note singular 'doc' not plural
Minimal setup with aiohttp application and SwaggerDocs.
from aiohttp import web
from aiohttp_swagger3 import SwaggerDocs
app = web.Application()
swagger = SwaggerDocs(app, swagger_url="/api/doc", title="My API")
async def hello(request):
return web.json_response({"hello": "world"})
swagger.add_get("/hello", hello, summary="Hello endpoint")
web.run_app(app)
Errors
Common errors & fixes
AttributeError: module 'aiohttp_swagger3' has no attribute 'SwaggerDocs'
Using an outdated version or wrong import path.
fixEnsure you have installed aiohttp-swagger3 (pip install aiohttp-swagger3) and use 'from aiohttp_swagger3 import SwaggerDocs'.
aiohttp_swagger3.exceptions.RequestValidationError
Request validation failed (e.g., missing required field, wrong type).
fixCheck your OpenAPI spec and request payload against the schema.
Upgrade
Version history
0.10.0latest on PyPI · released Feb 11, 2025
Audit
Dependencies
No dependency data recorded yet.