# apiflask/apiflask

A lightweight Python web API framework.

Repository: https://github.com/apiflask/apiflask
Canonical: https://ross.abutalabs.com/products/apiflask
Homepage: https://apiflask.com
Language: Python
License: MIT
License Family: permissive
Topics: api, rest, flask, python, openapi, swagger, marshmallow, redoc, swagger-ui, openapi3
Last push: 2026-08-23T14:37:09+00:00

## Health v2 (maintenance only)
Score: 92/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 77, longevity 100
- inputs: {"age_days": 2058, "days_push": 10, "days_rel": 75, "gap_med": 77, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1134, forks 142 (observed 2026-08-28T04:03:43.227899+00:00)

## What it is
APIFlask is a lightweight Python web API framework built on Flask that adds declarative input/output handling, automatic request validation, and automatic OpenAPI specification generation. It supports both marshmallow schemas and Pydantic models and serves interactive API documentation via Swagger UI, Redoc, Elements, RapiDoc, or RapiPDF.

## Use cases
- build a REST API in Python with automatic OpenAPI docs
- add request validation and serialization to a Flask app
- generate Swagger UI documentation from Flask routes
- migrate from Flask-RESTPlus/Flask-RESTX to a maintained framework
- serve a JSON API with automatic error responses
- use Pydantic models with a Flask-based API

## When to choose
- you want Flask compatibility plus automatic OpenAPI generation and interactive docs
- you prefer declarative input/output decorators over manual request parsing
- you want to choose between marshmallow and Pydantic for validation
- you are migrating away from Flask-RESTPlus/Flask-RESTX

## When to avoid
- you need an async-first framework like FastAPI with native ASGI support
- you are building a traditional server-rendered web app rather than an API
- you want a batteries-included framework with built-in ORM and admin

## Facets
- artifact type: framework
- maturity: active
- function: web-framework, api-framework, serialization, auth, middleware, routing
- domain: web-development, backend, apis, developer-tools
- platform: python, cross-platform
- tags: flask, openapi, swagger-ui, redoc, marshmallow, pydantic, rest-api, api-documentation

## Member repositories
- apiflask/apiflask (main) score 92

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:43.227899+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-30T06:36:54.365038+00:00, confidence not recorded.
  - readme: https://github.com/apiflask/apiflask (fetched 2026-08-28T04:03:43.227899+00:00, sha 09a86c7f91af)
  - homepage: https://apiflask.com (fetched 2026-08-29T12:42:14.025585+00:00, sha 5608bcf3ad1b)
  - site_page: https://zh.apiflask.com/docs (fetched 2026-08-29T12:42:14.041989+00:00, sha f536dbbfe48c)
  - site_page: https://apiflask.com/docs (fetched 2026-08-29T12:42:14.035097+00:00, sha 9c2143f06e9a)
  - site_page: https://apiflask.com/api-docs (fetched 2026-08-29T12:42:14.037202+00:00, sha 6ca87e7f8b99)
  - registry_pypi: https://pypi.org/pypi/apiflask/json (fetched 2026-08-29T12:42:14.043964+00:00, sha 1a0d913173a4)
  - site_page: https://apiflask.com/changelog (fetched 2026-08-29T12:42:14.039419+00:00, sha f334bc17becd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
