--- id: flask-openapi3 version: "4.3.2" license: MIT license_treatment: permissive maintenance: active --- # flask-openapi3 — Generate REST API and OpenAPI documentation for your Flask project. License: permissive · Maintenance: active · Downloads: 609.6K/mo ## 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 above — verify before relying. Builds REST APIs on Flask with automatic OpenAPI documentation and Pydantic-based request/response validation. 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 pip install flask-openapi3 uv add flask-openapi3 poetry add flask-openapi3 ## Installing flask-openapi3 Before you install: Low friction: pure Python wheel, only two runtime dependencies (Flask and Pydantic). Actively maintained with recent commits and stable production status. 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() Requires Python 3.10 or later. 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_current - Install friction: low - Maintenance: active - Downloads: 609.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flask rest api openapi, automatic api documentation, pydantic flask validation, swagger ui flask, openapi spec generator, flask api framework, interactive api docs, openapi-spec, rest-api, documentation-generation [View on SkillFed](https://skillfed.io/packages/flask-openapi3) · [View on PyPI](https://pypi.org/project/flask-openapi3/)