flask-apispec
Build and document REST APIs with Flask and apispec
Decision gist · record as of 2026-08-14
Yes, if you are starting a new Flask REST API and want lightweight decorator-based request/response handling plus automatic Swagger generation. No, if you need active maintenance, support for the latest OpenAPI/Swagger standards, or compatibility with recent versions of its dependencies—the aging status and lack of updates since 2022 mean you may encounter compatibility issues or missing features. Consider it a stable but unmaintained choice for greenfield projects with stable dependency versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later; webargs, marshmallow, and apispec must be installed and compatible.
- Low install friction; depends on four well-established packages (flask, marshmallow, webargs, apispec).
- Maintenance is aging—last release was 2022-08-11 and no commits since 2025-05-04—so expect no active bug fixes or feature development, though the repo remains unarchived.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute flask-apispec with minimal restrictions, provided you include the license notice.
last release 2022-08-11 (1464 days) · last repo commit 2025-05-04 · 653 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 356,015 downloads/mo, #7,286 on PyPI
Alternatives
Verify before relying
pip install flask-apispec
from flask import Flask
from flask_apispec import use_kwargs, marshal_with
from marshmallow import Schema
from webargs import fields
app = Flask(__name__)
class PetSchema(Schema):
class Meta:
fields = ('name', 'category')
@app.route('/pets')
@use_kwargs({'category': fields.Str()})
@marshal_with(PetSchema(many=True))
def get_pets(**kwargs):
return []- Whether the package remains compatible with current versions of Flask, webargs, marshmallow, and apispec given the aging maintenance status.
- Whether Swagger/OpenAPI generation still produces valid specs for modern API documentation tools.
What it is and what it does
flask-apispec is a lightweight decorator-based library that bridges Flask, webargs, marshmallow, and apispec to streamline REST API development. It lets you annotate view functions and class-based views with decorators that simultaneously handle request parsing, response serialization, and automatic Swagger documentation generation. Instead of writing separate validation and documentation code, you declare your schema once and flask-apispec handles the rest.
The package works with vanilla Flask or Flask-RESTful, supporting both function-based and class-based views. It automatically serves Swagger JSON and Swagger-UI at configurable endpoints. However, the project is aging—last released in August 2022 with no active development since—so it may not track the latest versions of its dependencies or modern OpenAPI standards.
Use it for
- Build a REST API where request validation, response formatting, and Swagger docs are all declared via decorators on a single view.
- Generate live Swagger documentation automatically from your Flask route handlers without writing separate spec files.
- Migrate from Flask-RESTful or Flask-RESTplus to a lighter-weight approach that still provides structured request/response handling.
- Combine webargs request parsing with marshmallow serialization in a single decorator stack on class-based views.
- Serve Swagger-UI alongside your API to provide interactive documentation to API consumers.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are starting a new Flask REST API and want lightweight decorator-based request/response handling plus automatic Swagger generation.
No, if you need active maintenance, support for the latest OpenAPI/Swagger standards, or compatibility with recent versions of its dependencies—the aging status and lack of updates since 2022 mean you may encounter compatibility issues or missing features. Consider it a stable but unmaintained choice for greenfield projects with stable dependency versions.
Install
flask-apispec on PyPI
Before you install
Low install friction; depends on four well-established packages (flask, marshmallow, webargs, apispec). Maintenance is aging—last release was 2022-08-11 and no commits since 2025-05-04—so expect no active bug fixes or feature development, though the repo remains unarchived.
Requires Python 3.6 or later; webargs, marshmallow, and apispec must be installed and compatible.
License in practice
MIT license is permissive; you can use, modify, and distribute flask-apispec with minimal restrictions, provided you include the license notice.
Quickstart
pip install flask-apispec
from flask import Flask
from flask_apispec import use_kwargs, marshal_with
from marshmallow import Schema
from webargs import fields
app = Flask(__name__)
class PetSchema(Schema):
class Meta:
fields = ('name', 'category')
@app.route('/pets')
@use_kwargs({'category': fields.Str()})
@marshal_with(PetSchema(many=True))
def get_pets(**kwargs):
return []
Verify before relying
- Whether the package remains compatible with current versions of Flask, webargs, marshmallow, and apispec given the aging maintenance status.
- Whether Swagger/OpenAPI generation still produces valid specs for modern API documentation tools.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesflaskmarshmallowwebargsapispec |
| Maintenance | Aging 1,464 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 356,015 / month, #7,286 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: flask_apispec-0.11.4-py2.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 swagger documentation”
- flask-apispecflask-apispec decorates Flask view functions and classes to…
- 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 Application Frameworks packages
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Textual is a Python framework for building cross-platform user interfaces that run in the terminal or web browser using a modern, component-based API.
Install it if you're developing CLI tools, dashboards, or interactive terminal applications.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Build and connect to Model Context Protocol servers that expose tools, resources, and prompts to LLM applications over stdio, HTTP, or SSE transports.
Install it if you need to build or connect to servers.
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.
See also apispec · webargs · apispec-webframeworks · Flask-RESTful · APIFlask · flask-restplus · flasgger · flask-swagger · apispec-oneofschema · flask-restx