skillfed

flask-restx

Fully featured framework for fast, easy and documented API development with Flask

flask-restx v1.3.2 2.1M downloads/30d#3,304 on PyPI2,234
Permissive license BSD-3-Clause Active released

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-restx

uv

uv add flask-restx

poetry

poetry add flask-restx

Installing 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

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: Software Distribution

Tags

flask rest api frameworkswagger openapi documentationrest api with decoratorsflask api scaffoldingautomatic api documentationrest endpoint validationflask rest extension
rest-apiswagger-openapiflask-extension

More Python Modules packages