Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

https://img.shields.io/pypi/v/djoser.svg Build Status https://codecov.io/gh/sunscrapers/djoser/branch/master/graph/badge.svg https://img.shields.io/pypi/dm/djoser Docs

REST implementation of Django authentication system. djoser library provides a set of Django Rest Framework views to handle basic actions such as registration, login, logout, password reset and account activation. It works with custom user model.

Supported features include:

  • Token-based authentication

  • JWT authentication

  • Social authentication

  • WebAuthn support

Instead of reusing Django code (e.g. PasswordResetForm), we reimplemented few things to fit better into Single Page App architecture.

Developed by SUNSCRAPERS with passion & patience.

https://asciinema.org/a/94J4eG2tSBD2iEfF30a6vGtXw.png

Requirements

To be able to run djoser you have to meet the following requirements:

  • Python>=3.9,<4.0 (including 3.10, 3.11, 3.12, and 3.13)

  • Django>=3.2 (supporting Django 3.2 through 5.2)

  • Django REST Framework>=3.14

Installation

Simply install using pip:

$ pip install djoser

And continue with the steps described at configuration guide.

Documentation

Documentation is available to study at https://djoser.readthedocs.io and in docs directory.

Contributing and development

To start developing on djoser, clone the repository:

$ git clone git@github.com:sunscrapers/djoser.git

We use uv as dependency management and packaging tool.

$ cd djoser
$ uv sync --all-extras --all-groups

This will create a virtualenv with all development dependencies.

To run the test just type:

$ uv run pytest testproject/

We also prepared a convenient Makefile to automate commands above:

$ make init
$ make test

To activate the virtual environment run

$ source .venv/bin/activate

Without uv

You can also use pip with pyproject.toml to build the package and install its dependencies.

$ pip install .[test]
$ cd testproject
$ ./manage.py test

Example project

You can also play with test project by running following commands:

$ make migrate
$ make runserver

Commiting your code

Before sending patches please make sure you have pre-commit activated in your local git repository:

$ uv run pre-commit install

This will ensure that your code is cleaned before you commit it. The pre-commit hooks will run:

  • Black (code formatting)

  • Ruff (linting)

  • Docformatter (docstring formatting)

  • Other quality checks

Similar projects

List of projects related to Django, REST and authentication:

Please, keep in mind that while using custom authentication and TokenCreateSerializer validation, there is a path that ignores intentional return of None from authenticate() and try to find User using parameters. Probably, that will be changed in the future.

Download files

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

Source Distribution

djoser-2.3.4a1.tar.gz (33.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

djoser-2.3.4a1-py3-none-any.whl (72.1 kB view details)

Uploaded Python 3

File details

Details for the file djoser-2.3.4a1.tar.gz.

File metadata

  • Download URL: djoser-2.3.4a1.tar.gz
  • Upload date:
  • Size: 33.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for djoser-2.3.4a1.tar.gz
Algorithm Hash digest
SHA256 a6f0151195bfb3b3d903b2f4f8f94bf14e2e84a6192bb377bb312cd8cdeb049e
MD5 f99ff5cda09c30b598009264e6bea6c3
BLAKE2b-256 d17031f18aa51bd70342c3a392f6f6297c6fd2c15b645b59e63b90cd9dcfb42d

See more details on using hashes here.

File details

Details for the file djoser-2.3.4a1-py3-none-any.whl.

File metadata

  • Download URL: djoser-2.3.4a1-py3-none-any.whl
  • Upload date:
  • Size: 72.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for djoser-2.3.4a1-py3-none-any.whl
Algorithm Hash digest
SHA256 136a0e6dbcfab455be79736b894a8e7211bc75dedc5001a8a0e47e69afb902ae
MD5 2b9daf4e81157670a478ff5dd7e5d182
BLAKE2b-256 be274138339705d34433e797d9bb0a4da4f27339f5dffd15392d5fa94ed0fdeb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page