apispec-webframeworks
Web framework plugins for apispec.
What it is and what it does
apispec-webframeworks provides plugins that bridge web frameworks and apispec, a library for building OpenAPI specifications programmatically. Instead of writing OpenAPI YAML by hand, you annotate your route handlers with docstrings and let the plugins extract parameter schemas, request/response types, and route metadata automatically. The package was split out from apispec's core and now maintains separate plugins for Flask, aiohttp, Bottle, and Tornado.
You install it alongside apispec and your chosen framework, then register the appropriate plugin when creating your APISpec instance. The plugins inspect your application's routes and docstrings to populate the specification, reducing duplication between your code and documentation. It requires Python 3.8 or later and has no heavy system dependencies.
Use it for:
- Generate OpenAPI specs for Flask REST APIs without manually writing YAML or JSON definitions
- Automatically document Tornado or aiohttp async endpoints with request/response schemas
- Migrate from older apispec versions by updating imports to use this separate package
- Keep API documentation in sync with code by deriving specs from route handlers
- Integrate OpenAPI specs into Swagger UI or ReDoc for interactive API browsing
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides web framework plugins for apispec to automatically generate OpenAPI specifications from Flask, aiohttp, Bottle, and Tornado applications.
Yes, if you use Flask, aiohttp, Bottle, or Tornado and want to generate OpenAPI specs from your code. It has low install friction, active maintenance, no known vulnerabilities, permissive licensing, and solves a real problem—keeping API documentation synchronized with implementation.
Install
apispec-webframeworks on PyPI
pip
pip install apispec-webframeworksuv
uv add apispec-webframeworkspoetry
poetry add apispec-webframeworksInstalling apispec-webframeworks
Before you install
Low friction: single lightweight dependency on apispec, pure Python wheel, actively maintained with recent commits.
License in practice
MIT licensed under permissive terms, allowing commercial and private use with minimal restrictions.
Quickstart
pip install apispec-webframeworks
from apispec_webframeworks.flask import FlaskPlugin
from apispec import APISpec
spec = APISpec(
title="API",
version="1.0.0",
plugins=[FlaskPlugin()],
)
Requires Python 3.8 or later; requires apispec to be installed separately.
Verify before relying
- Whether all four framework plugins (aiohttp, bottle, flask, tornado) are production-ready or have known limitations
- Performance impact when generating specs for large applications with many routes
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — apispec |
| Maintenance | actively maintained — 697 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 627,434/month — #5,682 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: apispec_webframeworks-1.2.0-py3-none-any.whl
Tags
More Application Frameworks packages
FastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
textualTextual is a Python framework for building…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
mcpBuild and connect to Model Context Protocol…
permissive · top 1,000 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
apispecGenerates OpenAPI specification documents from…
permissive · top 5,000 on PyPI
webargswebargs parses and validates HTTP request…
permissive · top 5,000 on PyPI
flask-apispecflask-apispec decorates Flask view functions…
permissive · top 15,000 on PyPI
apispec-oneofschemaExtends apispec to generate OpenAPI 3.0+…
permissive · top 15,000 on PyPI
flask-openapi3Builds REST APIs on Flask with automatic…
permissive · top 15,000 on PyPI
swagger-ui-pyIntegrates Swagger UI documentation into Python…
permissive · top 15,000 on PyPI
APIFlaskAPIFlask is a lightweight web API framework…
permissive · top 15,000 on PyPI
flasggerFlasgger extracts OpenAPI specifications from…
permissive · top 5,000 on PyPI
flask-marshmallowFlask-Marshmallow integrates Flask and…
permissive · top 5,000 on PyPI
flask-pydantic-specAdds OpenAPI documentation generation and…
unclear · top 15,000 on PyPI