flask-openapi3
Generate REST API and OpenAPI documentation for your Flask project.
Decision gist · record as of 2026-08-14
Yes. Low install friction, active maintenance, no known vulnerabilities, permissive MIT license, and a focused scope—Flask + Pydantic + OpenAPI docs—make this a solid choice for REST APIs that need automatic documentation and validation. Best fit for teams already using Flask who want OpenAPI compliance without switching frameworks.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low friction: pure Python wheel, only two runtime dependencies (Flask and Pydantic).
- Actively maintained with recent commits and stable production status.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
last release 2026-05-09 (97 days) · last repo commit 2026-08-01 · 268 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 609,606 downloads/mo, #5,771 on PyPI
Alternatives
Verify before relying
pip install flask-openapi3
from pydantic import BaseModel
from flask_openapi3 import OpenAPI, Info
info = Info(title="My API", version="1.0.0")
app = OpenAPI(__name__, info=info)
class QueryModel(BaseModel):
name: str
@app.get("/hello")
def hello(query: QueryModel):
return {"message": f"Hello {query.name}"}
if __name__ == "__main__":
app.run()- Performance characteristics under high request volume or with large payloads.
- Compatibility with specific Flask extensions or middleware patterns.
- Completeness of OpenAPI 3.1.0 specification coverage in edge cases.
What it is and what it does
Flask-OpenAPI3 extends Flask with built-in OpenAPI 3.1.0 support and automatic interactive documentation. It wraps request/response handling with Pydantic models for type validation and serialization, eliminating manual schema definition. The framework generates Swagger, Redoc, RapiDoc, RapiPdf, Scalar, and Elements UI automatically, making API contracts visible to clients and developers without extra work.
The package supports both function-based and class-based API views, path/query/body parameter validation, and optional async/await support via asgiref. It's designed for developers who want Flask's simplicity with OpenAPI's documentation and validation guarantees, reducing boilerplate while keeping the Flask development experience intact.
Use it for
- Build a microservice with automatic Swagger documentation visible at /openapi without writing YAML.
- Validate incoming JSON payloads against Pydantic schemas and reject malformed requests automatically.
- Generate client SDKs or test suites from the live OpenAPI spec served by your Flask app.
- Migrate a Flask project to OpenAPI compliance by wrapping existing routes with Pydantic models.
- Create a REST API where request/response types are enforced at runtime and documented in one place.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, active maintenance, no known vulnerabilities, permissive MIT license, and a focused scope—Flask + Pydantic + OpenAPI docs—make this a solid choice for REST APIs that need automatic documentation and validation. Best fit for teams already using Flask who want OpenAPI compliance without switching frameworks.
Install
flask-openapi3 on PyPI
Before you install
Low friction: pure Python wheel, only two runtime dependencies (Flask and Pydantic). Actively maintained with recent commits and stable production status.
Requires Python 3.10 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions—suitable for most projects.
Quickstart
pip install flask-openapi3
from pydantic import BaseModel
from flask_openapi3 import OpenAPI, Info
info = Info(title="My API", version="1.0.0")
app = OpenAPI(__name__, info=info)
class QueryModel(BaseModel):
name: str
@app.get("/hello")
def hello(query: QueryModel):
return {"message": f"Hello {query.name}"}
if __name__ == "__main__":
app.run()
Verify before relying
- Performance characteristics under high request volume or with large payloads.
- Compatibility with specific Flask extensions or middleware patterns.
- Completeness of OpenAPI 3.1.0 specification coverage in edge cases.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesflaskpydantic |
| Maintenance | Actively maintained 97 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 609,606 / month, #5,771 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: FlaskIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: flask_openapi3-4.3.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “flask rest api openapi”
- flask-openapi3Builds REST APIs on Flask with automatic OpenAPI documentation and…
- flask-restplusFlask-RESTPlus adds decorators and tools to Flask for building REST…
- flask-restxFlask-RESTX extends Flask with decorators and tools to quickly build…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also APIFlask · connexion · fastapi · flask-openapi3-swagger · flask-pydantic-spec · django-ninja · Flask-Pydantic · quart-schema · aiopenapi3 · flask-openapi3-elements