Skip to main content

api versioning for fastapi web applications

Project description


api versioning for fastapi web applications

from fastapi import FastAPI
from fastapi_versioning import VersionedFastAPI, version

app = FastAPI(title='My App')

@version(1, 0)
def greet():
  return 'Hello'

@version(1, 1)
def greet():
  return 'Hi'

app = VersionedFastAPI(app)

this will generate two endpoints:


as well as:


Try it out:

pip install pipenv
pipenv install --dev
pipenv run uvicorn

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for fastapi-versioning, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size fastapi_versioning-0.3.0-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size fastapi_versioning-0.3.0.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page