drf-jwt
JSON Web Token based authentication for Django REST framework
What it is and what it does
drf-jwt is a Django REST Framework authentication backend that implements JWT (JSON Web Token) authentication. It sits between your REST API and PyJWT, providing a Django-friendly interface to issue and validate bearer tokens without server-side session storage. You configure it in your DRF settings, and it handles token generation and validates incoming requests by checking the Authorization header.
The package is designed for stateless API authentication—clients exchange credentials once for a token, then include that token in subsequent requests. It depends on Django, Django REST Framework, and PyJWT to function. The library itself is marked as Production/Stable, but development has stalled since early 2022, meaning no new features or security patches are being released.
Use it for:
- Building a REST API where clients authenticate once and use a token for multiple requests without server-side session overhead.
- Creating a mobile or single-page app backend that issues JWT tokens at login and validates them on protected endpoints.
- Implementing stateless microservice authentication where each service validates tokens independently without a shared session store.
- Adding JWT support to an existing Django REST Framework project that currently lacks token-based authentication.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds JSON Web Token (JWT) authentication to Django REST Framework APIs, allowing stateless token-based access control for REST endpoints.
Yes, with caution. The package is stable and low-friction to install, but it has been dormant since early 2022 with no active maintenance. Use it if your project is on a stable Django/DRF version and you do not expect frequent framework upgrades. For new projects or those requiring ongoing security patches, consider whether a more actively maintained alternative better fits your risk tolerance.
Install
drf-jwt on PyPI
pip
pip install drf-jwtuv
uv add drf-jwtpoetry
poetry add drf-jwtInstalling drf-jwt
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant: last commit was 2023-10-13 and no release since 2022-01-09, so expect no active bug fixes or security patches going forward.
License in practice
MIT license is permissive—you can use, modify, and distribute this package freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install drf-jwt
from drf_jwt import views, authentication
# Configure in Django REST Framework settings with JSONWebTokenAuthentication
Requires Django 1.11+, Django REST Framework 3.7+, and PyJWT as runtime dependencies.
Verify before relying
- Whether the package remains compatible with modern Django and DRF versions released after 2022.
- Security implications of using an unmaintained JWT library in production systems.
- Whether PyJWT dependency updates are automatically picked up or if pinned versions create compatibility gaps.
- Specific configuration steps and available authentication classes in the current API.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — PyJWT, Django, djangorestframework |
| Maintenance | dormant — 1,678 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 583,190/month — #5,896 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: drf_jwt-1.19.2-py2.py3-none-any.whl
Keywords: Styria CMS, JSON API
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
django-rest-knoxProvides token-based authentication for Django…
permissive · top 5,000 on PyPI
djangorestframework-jwtAdds JSON Web Token (JWT) authentication…
permissive · top 15,000 on PyPI
taktile-authProvides authentication and authorization…
permissive · top 15,000 on PyPI
zi-api-auth-clientGenerates JWT tokens for ZoomInfo…
permissive · top 15,000 on PyPI
djangorestframework-simplejwtProvides JSON Web Token (JWT) authentication…
permissive · top 5,000 on PyPI
edx-drf-extensionsProvides JWT authentication, CSRF token…
permissive · top 15,000 on PyPI
dj-rest-authProvides drop-in REST API endpoints for user…
permissive · top 5,000 on PyPI
django-graphql-jwtAdds JSON Web Token (JWT) authentication to…
permissive · top 15,000 on PyPI
django-ninja-jwtProvides JWT authentication for Django-Ninja…
permissive · top 15,000 on PyPI
django-sesamedjango-sesame provides token-based…
permissive · top 15,000 on PyPI