--- id: djangorestframework-simplejwt version: "5.5.1" license: MIT license_treatment: permissive maintenance: active --- # djangorestframework-simplejwt — A minimal JSON Web Token authentication plugin for Django REST Framework License: permissive · Maintenance: active · Downloads: 8.3M/mo ## What it is and what it does Simple JWT is a minimal authentication plugin that adds JSON Web Token support to Django REST Framework. It sits between your DRF views and incoming requests, validating bearer tokens in the Authorization header and attaching the authenticated user to the request object. The package handles token issuance on login and validation on each request, integrating directly into DRF's authentication and permission system. It depends on django, djangorestframework, and pyjwt to handle the cryptographic signing and verification. The package is designed for stateless API authentication—tokens are self-contained and don't require server-side session storage. Once configured, protected views work like any other DRF permission class. Use it for: - Secure a REST API with token-based authentication that doesn't require server-side session storage. - Authenticate microservices or third-party integrations using bearer tokens in the Authorization header. - Add JWT authentication to an existing Django REST Framework project with minimal configuration. - Build stateless authentication for horizontally scaled API servers without shared session backends. - Integrate token-based auth into mobile or SPA clients that need to authenticate with a Django API. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides JSON Web Token (JWT) authentication for Django REST Framework applications, handling token generation, validation, and request authentication. Yes. This is a production-stable, actively maintained package with no known vulnerabilities, low install friction, and a permissive MIT license. It is the standard JWT authentication choice for Django REST Framework and is widely used in the ecosystem. Install it if you need token-based authentication for a DRF API. ## Install pip install djangorestframework-simplejwt uv add djangorestframework-simplejwt poetry add djangorestframework-simplejwt ## Installing djangorestframework-simplejwt Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained with recent commits and a stable production status across Django 4.2 through 5.2 and Python 3.9–3.13. License in practice: MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely as long as you include the original license notice. Quickstart: pip install djangorestframework-simplejwt from djangorestframework_simplejwt.views import TokenObtainPairView from djangorestframework_simplejwt.authentication import JWTAuthentication # In urls.py: path('api/token/', TokenObtainPairView.as_view()) # In views: authentication_classes = [JWTAuthentication] Requires django and djangorestframework to be installed and configured; assumes a working DRF project structure. Verify before relying: - Whether token refresh and expiration strategies are configurable for different security requirements. - Support for custom claim serialization or non-standard JWT payloads beyond the documented defaults. - Specific implementation details of the token lifecycle and refresh flow. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 8.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags jwt authentication django, django rest framework token auth, json web token django, django api authentication, bearer token django rest, stateless authentication django, jwt token refresh django, jwt-auth, stateless-auth [View on SkillFed](https://skillfed.io/packages/djangorestframework-simplejwt) · [View on PyPI](https://pypi.org/project/djangorestframework-simplejwt/)