Skip to main content

djoser

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.

Metadata

Release files for djoser 2.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djoser 2.3.5
File Size Uploaded
djoser-2.3.5.tar.gz 33.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for djoser 2.3.5
File Interpreter ABI Platform
djoser-2.3.5-py3-none-any.whl Python 3 none any Details

Total release size: 106.9 kB

Release files / djoser-2.3.5.tar.gz

Download URL djoser-2.3.5.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
861487c21da73563da5c81ea61c3790f433d3e6ea80f4b2c2e9783ea9016c298
BLAKE2b-256 checksum
How to use checksums
0e0c776b9501f04f34fbf87018c4f9b13e0076c54e47be1804a057ae217edb57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}

Release files / djoser-2.3.5-py3-none-any.whl

Download URL djoser-2.3.5-py3-none-any.whl
Size 73.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c662040702840f10ed74f5938d13025e177331994c52f7b9fb03cfd32cdaa57
BLAKE2b-256 checksum
How to use checksums
9cb70d8ab682dea33a92caf83f55eb689028c0ba15cbc448b65446a5f213aeed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","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}

Release history Release notifications | RSS feed

This release

2.3.5 This release

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.4.1

2 release files

1.3.3

2 release files

1.2.2

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.7.0

2 release files

0.6.0

1 release file

0.5.4

1 release file

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page