--- id: flask-apispec version: "0.11.4" license: MIT license_treatment: permissive maintenance: aging --- # flask-apispec — Build and document REST APIs with Flask and apispec License: permissive · Maintenance: aging · Downloads: 356.0K/mo ## 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 above — verify before relying. flask-apispec decorates Flask view functions and classes to automatically parse requests with webargs, format responses with marshmallow, and generate Swagger documentation via apispec. 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 pip install flask-apispec uv add flask-apispec poetry add flask-apispec ## Installing flask-apispec 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. 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 [] Requires Python 3.6 or later; webargs, marshmallow, and apispec must be installed and compatible. 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_current - Install friction: low - Maintenance: aging - Downloads: 356.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags flask rest api swagger documentation, flask request parsing response formatting, flask apispec decorators, swagger generation flask, flask marshmallow webargs integration, flask rest api documentation, openapi swagger flask, rest-api, swagger-openapi, request-validation [View on SkillFed](https://skillfed.io/packages/flask-apispec) · [View on PyPI](https://pypi.org/project/flask-apispec/)