# flasgger/flasgger

Easy OpenAPI specs and Swagger UI for your Flask API

Repository: https://github.com/flasgger/flasgger
Canonical: https://ross.abutalabs.com/products/flasgger
Homepage: http://flasgger.pythonanywhere.com/
Language: Python
License: MIT
License Family: permissive
Topics: api, flask, openapi, openapi-specification, marshmallow, swagger, swagger-ui, api-documentation, api-framework, flask-restful, restful, rest-api, flask-extension, flask-extensions
Last push: 2024-06-17T23:38:25+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4055, "days_push": 807, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3744, forks 525 (observed 2026-08-28T04:08:16.041398+00:00)

## What it is
Flasgger is a Flask extension that extracts OpenAPI (Swagger) specifications from Flask views using docstrings, YAML files, dictionaries, or Marshmallow schemas. It embeds Swagger UI at /apidocs and can validate incoming request data against the defined schemas.

## Use cases
- generate OpenAPI docs for a Flask API
- add Swagger UI to my Flask endpoints
- document Flask-RESTful resources with YAML specs
- validate POST request bodies against Marshmallow schemas
- define API specs in docstrings instead of separate files
- serve interactive API documentation from a Flask app

## When to choose
- you have a Flask or Flask-RESTful API and want OpenAPI docs with minimal setup
- you want embedded Swagger UI for exploring and testing endpoints
- you prefer defining specs via docstrings, YAML, dicts, or Marshmallow schemas
- you want request validation driven by the same spec

## When to avoid
- your API is not built on Flask
- you need OpenAPI 3.x-first tooling with advanced features other generators provide
- you use FastAPI or Django, which have their own spec ecosystems
- you need a framework-agnostic spec generator like apispec

## Facets
- artifact type: plugin
- maturity: active
- function: api-framework, api-documentation, middleware
- domain: web-development, apis, backend, documentation
- platform: python
- tags: flask-extension, openapi, swagger-ui, rest-api, marshmallow, request-validation, web-server

## Member repositories
- flasgger/flasgger (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:16.041398+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:29:04.475544+00:00, confidence not recorded.
  - readme: https://github.com/flasgger/flasgger (fetched 2026-08-28T04:08:16.041398+00:00, sha e021cf178aa8)
  - registry_pypi: https://pypi.org/pypi/flasgger/json (fetched 2026-08-29T09:23:15.977073+00:00, sha 61b63dc2a8cc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
