Package disclosure: The author is the creator, owner, and maintainer of django-api-versioning .
API versioning introduces a routing problem that grows with the number of endpoints and versions.
When an API evolves, some endpoints change while others remain compatible with newer versions. The routing configuration must represent both cases: endpoints with a new implementation and endpoints that can continue using an existing implementation.
Django and Django REST Framework provide the building blocks for versioned APIs. However, maintaining every versioned route explicitly can become repetitive, especially when most endpoints remain unchanged between releases.
A routing library can move that responsibility out of the project's URL configuration. Instead of declaring every route for every version, developers declare where an endpoint implementation becomes active.…