skillfed

fastapi-versioning

api versioning for fastapi web applications

fastapi-versioning v0.10.0 84.1K downloads/30d#14,028 on PyPI847
Permissive license Abandoned released

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-versioning

uv

uv add fastapi-versioning

poetry

poetry add fastapi-versioning

Installing 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

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8

Tags

fastapi api versioningversioned endpoints fastapiapi version managementfastapi multiple api versionsendpoint versioning decoratorfastapi v1 v2 routing
api-versioningdeprecated-but-functional

More Dynamic Content packages