# koxudaxi/fastapi-code-generator

This code generator creates FastAPI app from an openapi file.

Repository: https://github.com/koxudaxi/fastapi-code-generator
Canonical: https://ross.abutalabs.com/products/fastapi-code-generator
Language: Python
License: MIT
License Family: permissive
Topics: fastapi, openapi, generator, python, pydantic
Last push: 2026-08-17T17:57:56+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 91, longevity 100
- inputs: {"age_days": 2271, "days_push": 16, "days_rel": 63, "gap_med": 28.0, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1405, forks 153 (observed 2026-08-28T04:04:38.182503+00:00)

## What it is
A Python CLI tool that generates a FastAPI application, including Pydantic models and routers, from an OpenAPI document. It builds on datamodel-code-generator for the model layer and supports custom templates and visitors.

## Use cases
- generate a fastapi app from an openapi spec
- scaffold fastapi routes from swagger yaml
- convert openapi file to pydantic v2 models
- generate api server code from openapi 3 document
- bootstrap fastapi project from existing api contract
- create typed fastapi models from  schema

## When to choose
- you have an OpenAPI/Swagger spec and want a working FastAPI skeleton
- you want Pydantic models generated automatically from the spec
- you need customizable code generation via templates or custom visitors

## When to avoid
- you're building a FastAPI app from scratch without an OpenAPI spec
- you need a generic OpenAPI client generator rather than a server app
- you use a framework other than FastAPI

## Facets
- artifact type: cli-tool
- maturity: active
- function: cli, api-framework, templating
- domain: web-development, backend, apis, developer-tools
- platform: cli, python, cross-platform
- tags: fastapi, openapi, pydantic, code-generator, api-scaffolding, code-generation, python

## Member repositories
- koxudaxi/fastapi-code-generator (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:38.182503+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-30T04:38:47.485542+00:00, confidence not recorded.
  - readme: https://github.com/koxudaxi/fastapi-code-generator (fetched 2026-08-28T04:04:38.182503+00:00, sha 84cec4c08413)
  - registry_pypi: https://pypi.org/pypi/fastapi-code-generator/json (fetched 2026-08-29T11:52:35.085064+00:00, sha 97630d1c685b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
