flask-restx
Fully featured framework for fast, easy and documented API development with Flask
What it is and what it does
Flask-RESTX is a community-maintained extension for Flask that simplifies REST API development by providing a set of decorators and utilities to define endpoints, validate request/response schemas, and automatically generate Swagger documentation. It encourages best practices with minimal boilerplate—you define your API resources as classes, decorate them with namespace and HTTP method handlers, and Flask-RESTX handles routing, validation via jsonschema, and interactive API documentation.
The package depends on Flask, werkzeug, aniso8601 for date parsing, jsonschema for validation, and importlib-resources for resource loading. It's designed for developers already familiar with Flask who want to move faster when building documented APIs without switching to a heavier framework. The library is actively maintained, supports Python 3.9 through 3.12, and has been updated to work with modern Flask and Werkzeug versions.
Use it for:
- Build a REST API with automatic Swagger/OpenAPI documentation without writing separate spec files.
- Define request/response schemas using Flask-RESTX field models and validate payloads automatically.
- Organize endpoints into logical namespaces and expose them through a single Api instance.
- Generate interactive API documentation that clients can use to explore and test endpoints.
- Migrate from Flask-RESTPlus to a maintained fork with ongoing community support and compatibility updates.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Flask-RESTX extends Flask with decorators and tools to quickly build REST APIs with automatic Swagger documentation and schema validation.
Yes. Flask-RESTX is a stable, actively maintained extension with low install friction, no known vulnerabilities, and permissive licensing. It's well-suited for developers building REST APIs on Flask who want automatic documentation and schema validation without the overhead of a full framework migration. The recent maintenance history and broad Python version support make it a reliable choice.
Install
flask-restx on PyPI
pip
pip install flask-restxuv
uv add flask-restxpoetry
poetry add flask-restxInstalling flask-restx
Before you install
Low install friction with a pure-wheel distribution. Actively maintained as of September 2025 with recent commits and community stewardship since early 2023.
License in practice
BSD-3-Clause is permissive; you can use this in commercial and proprietary projects with minimal restrictions beyond retaining the license notice.
Quickstart
pip install flask-restx
from flask import Flask
from flask_restx import Api, Resource
app = Flask(__name__)
api = Api(app)
ns = api.namespace('items')
@ns.route('/')
class ItemList(Resource):
def get(self):
return {'items': []}
if __name__ == '__main__':
app.run()
Requires Python 3.9+; Flask 2.0+ (version 1.3.0+ supports Flask 3.0.0).
Verify before relying
- Whether the package's Swagger/OpenAPI generation covers all modern OpenAPI 3.x features or remains limited to earlier specs.
- Performance characteristics when documenting large APIs with hundreds of endpoints.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — aniso8601, jsonschema, referencing, Flask, werkzeug, importlib-resources |
| Maintenance | actively maintained — 325 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,088,467/month — #3,304 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: flask_restx-1.3.2-py2.py3-none-any.whl
Keywords: flask, restx, rest, api, swagger, openapi
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
flask-restplusFlask-RESTPlus adds decorators and tools to…
permissive · top 15,000 on PyPI
flask-swagger-uiAdds Swagger UI to Flask applications as a…
permissive · top 5,000 on PyPI
flask-openapi3Builds REST APIs on Flask with automatic…
permissive · top 15,000 on PyPI
flask-openapi3-swaggerProvides Swagger UI integration for…
permissive · top 15,000 on PyPI
flask-swaggerExtracts Swagger 2.0 API specifications from…
permissive · top 15,000 on PyPI
Flask-RESTfulFlask-RESTful provides decorators and utilities…
permissive · top 5,000 on PyPI
flask-apispecflask-apispec decorates Flask view functions…
permissive · top 15,000 on PyPI
flask-pydantic-specAdds OpenAPI documentation generation and…
unclear · top 15,000 on PyPI
flasggerFlasgger extracts OpenAPI specifications from…
permissive · top 5,000 on PyPI
quart-schemaQuart-Schema adds schema validation and…
permissive · top 15,000 on PyPI