fastapi-versioning
api versioning for fastapi web applications
What it is and what it does
fastapi-versioning is a decorator-based library that lets you define multiple versions of the same endpoint in a single FastAPI application and automatically generates separate URL paths for each version. You decorate endpoint functions with @version(major, minor) or @version(major), and the VersionedFastAPI wrapper transforms your app to create versioned routes like /v1_0/endpoint and /v1_1/endpoint, each with its own OpenAPI documentation. It also optionally generates /latest routes that point to the most recent version.
The package depends on fastapi and starlette as its only runtime dependencies, making it lightweight to add to an existing FastAPI project. However, the project is abandoned—the last release was 2021-08-24 and the last commit was 2023-07-25—so it will not receive updates for newer FastAPI or Starlette releases, which may cause compatibility issues over time.
Use it for:
- Maintain multiple API versions in a single codebase without duplicating route handlers or creating separate applications.
- Gradually deprecate old API versions while supporting new ones, with each version accessible at its own URL path.
- Generate separate OpenAPI documentation and Swagger UI for each API version so clients can see what changed.
- Support a /latest endpoint that automatically reflects the newest API version without hardcoding version numbers in client code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds API versioning to FastAPI applications by decorating endpoints with version numbers and generating separate versioned URL paths and documentation for each version.
Yes, if you are on a stable FastAPI version and need simple API versioning without external infrastructure. No, if you require ongoing maintenance or compatibility with the latest FastAPI releases—the package is abandoned and may break with future updates. Consider it a working solution for legacy projects or prototypes, not for new production systems expecting long-term support.
Install
fastapi-versioning on PyPI
pip
pip install fastapi-versioninguv
uv add fastapi-versioningpoetry
poetry add fastapi-versioningInstalling fastapi-versioning
Before you install
Low friction installation with only fastapi and starlette as runtime dependencies. However, the package is abandoned as of 2021-08-24 with no commits since 2023-07-25, so it will not receive maintenance or updates for newer FastAPI versions.
License in practice
Licensed under MIT (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install fastapi-versioning
from fastapi import FastAPI
from fastapi_versioning import VersionedFastAPI, version
app = FastAPI(title="My App")
@app.get("/greet")
@version(1, 0)
def greet_v1():
return "Hello"
app = VersionedFastAPI(app)
Requires Python 3.6 or later; package is abandoned and may not be compatible with recent FastAPI or Starlette versions.
Verify before relying
- Compatibility with current FastAPI and Starlette versions (last release was 2021-08-24)
- Whether the package works with Python versions beyond 3.8 (classifiers only list up to 3.8)
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — fastapi, starlette |
| Maintenance | abandoned — 1,816 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 84,080/month — #14,028 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fastapi_versioning-0.10.0-py3-none-any.whl
Tags
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
fastapi-decoratorsConverts functions into FastAPI-compatible…
permissive · top 15,000 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
fastapi-healthchecksAdds configurable health check endpoints to…
permissive · top 15,000 on PyPI
fastapi-auth0Integrates Auth0 authentication into FastAPI…
permissive · top 15,000 on PyPI
fastapi-cache2Caches FastAPI endpoint and function results…
permissive · top 5,000 on PyPI
fastapi-socketioIntegrates Socket.IO real-time bidirectional…
permissive · top 15,000 on PyPI
fastapi-limiterAdds request rate limiting to FastAPI routes…
permissive · top 5,000 on PyPI
fastapi-utilsProvides reusable utilities and base classes…
permissive · top 5,000 on PyPI
fastapi-cloudauthIntegrates FastAPI applications with cloud…
permissive · top 15,000 on PyPI
cadwynCadwyn generates older API versions…
permissive · top 5,000 on PyPI