Skip to main content

Versioning tools for use with Django Rest Framework

Project description

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 ❤️

Project details


Download files

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

Source Distribution

djangorestframework_versioning-2.1.0.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page