Skip to main content

Django REST Framework Versioning

This project aims to make it easy to support many different API versions in a Django REST Framework (DRF) project.

DRF supports several versioning schemes but (perhaps wisely) sidesteps the issue of how to actually deal with the different versions in your code. To quote the docs: "How you vary the API behavior is up to you".

This project provides some out-of-the box tools to handle versioning in views and serializers. The aim is to abstract away any versioning logic into a sort of "versioning layer" and allow the bulk of the code (and its developers) to focus on the latest behaviour.

Documentation

Please see the full documentation here.

Acknowledgements

The approach taken in this project was inspired by Stripe's API version "compatibility layer", as described in blog posts by Brandur Leach and Amber Feng. I used Ryan Kaneshiro's excellent Django sketch as a starting point.

I also want to thank my colleagues at Tranzer for encouraging me to work on this, and for being my guinea pigs / code duckies ❤️

Metadata

Release files for djangorestframework-versioning 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djangorestframework-versioning 2.1.0
File Size Uploaded Provenance
djangorestframework_versioning-2.1.0.tar.gz 9.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for djangorestframework-versioning 2.1.0
File Interpreter ABI Platform
djangorestframework_versioning-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.2 kB

Release files / djangorestframework_versioning-2.1.0.tar.gz

Download URL djangorestframework_versioning-2.1.0.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
82079a2461f53bebcd0e7f10e9888a7e0ed5ad2c089dba32810b22257f3d2bee
BLAKE2b-256 checksum
How to use checksums
85d7fdc646ba1c38353486e504bd39545ddb84aab5c7ca4c568e2bfb148a9993
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Release files / djangorestframework_versioning-2.1.0-py3-none-any.whl

Download URL djangorestframework_versioning-2.1.0-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
656671e5dda2ef322988e9e748597295650414f55a9befb57a96d6ee5a5ccc91
BLAKE2b-256 checksum
How to use checksums
09f9bbd02bf2ebd1dcc1c1a3fe5c41f12383910e018a406ccb4c53f83d3f3ee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.12

Security for djangorestframework-versioning 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page