django-rest-passwordreset
An extension of django rest framework, providing a configurable password reset strategy
What it is and what it does
Django-rest-passwordreset is a Django REST Framework extension that adds password reset functionality via REST endpoints. It provides two main endpoints: one to request a reset token (sent to a registered email) and another to verify the token and set a new password. The package does not assume how tokens are delivered—instead, it fires Django signals when tokens are created or used, allowing you to hook in your own delivery mechanism (email, SMS, push notification, etc.).
The package stores tokens in a database table with configurable expiry (default 24 hours) and includes a management command for periodic cleanup of expired tokens. It handles security concerns like token validation, expiration checking, and optional information-leakage prevention to avoid revealing whether an account exists. You integrate it by adding it to INSTALLED_APPS, running migrations, including its URL patterns, and connecting signal handlers to send notifications.
Use it for:
- Add a self-service password reset flow to a Django REST API without building token management from scratch.
- Send password reset links via email by connecting to the reset_password_token_created signal.
- Validate reset tokens before allowing password changes, with automatic expiry and cleanup.
- Prevent account enumeration attacks by returning generic responses for invalid, expired, or missing tokens.
- Schedule periodic cleanup of expired tokens using the included management command to keep the database lean.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides REST API endpoints for Django applications to handle password reset requests and confirmations, with token-based verification and signal-driven delivery (email, SMS, etc.).
Yes. This is a production-stable, actively maintained package with zero dependencies and low install friction. It solves a common Django problem (password reset) with a clean signal-based design that lets you control delivery. No known vulnerabilities. Use it unless you need highly custom password reset logic that the signal system cannot accommodate.
Install
django-rest-passwordreset on PyPI
pip
pip install django-rest-passwordresetuv
uv add django-rest-passwordresetpoetry
poetry add django-rest-passwordresetInstalling django-rest-passwordreset
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained with recent releases and 435 repository stars. Production-stable status.
License in practice
BSD License (permissive): you can use this in commercial and proprietary projects with minimal restrictions, provided you include a copy of the license.
Quickstart
pip install django-rest-passwordreset
# In settings.py INSTALLED_APPS:
INSTALLED_APPS = [
'rest_framework',
'django_rest_passwordreset',
]
# In urls.py:
path('api/password_reset/', include('django_rest_passwordreset.urls', namespace='password_reset'))
# Run migrations:
# python manage.py migrate
# Connect a signal handler to send emails:
from django_rest_passwordreset.signals import reset_password_token_created
from django.dispatch import receiver
@receiver(reset_password_token_created)
def send_password_reset_email(sender, reset_password_token, **kwargs):
# Send email with reset_password_token.key
Requires Django and Django REST Framework to be installed and configured in your project; the package itself has no runtime dependencies but is useless without them.
Verify before relying
- Whether Django and Django REST Framework are listed as explicit install dependencies or assumed to be pre-installed.
- Exact token expiry time default value (description mentions 24 hours but setting name differs from documented behavior).
- Whether the management command name is `clearresetpasswodtokens` (as shown) or if that is a typo in the documentation.
Package facts
| License | BSD License (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 46 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 371,827/month — #7,169 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_rest_passwordreset-1.6.0-py3-none-any.whl
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
dj-rest-authProvides drop-in REST API endpoints for user…
permissive · top 5,000 on PyPI
django-sesA Django email backend that routes outgoing…
permissive · top 5,000 on PyPI
django-revproxyA Django application that forwards HTTP…
copyleft · top 15,000 on PyPI
django-sesamedjango-sesame provides token-based…
permissive · top 15,000 on PyPI
djangorestframeworkBuilds web APIs on top of Django with…
permissive · top 1,000 on PyPI
drf-jwtAdds JSON Web Token (JWT) authentication to…
permissive · top 15,000 on PyPI
drf-api-loggerCaptures and logs Django REST Framework API…
permissive · top 15,000 on PyPI
djangorestframework-guardianIntegrates django-guardian's object-level…
permissive · top 15,000 on PyPI
fastapi-usersProvides ready-to-use user registration, login,…
permissive · top 5,000 on PyPI
mailjet-restA Python wrapper for the Mailjet Email API that…
permissive · top 5,000 on PyPI