1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
|
Metadata-Version: 2.1
Name: djoser
Version: 2.3.3
Summary: REST implementation of Django authentication system.
Home-page: https://github.com/sunscrapers/djoser
License: MIT
Author: Sunscrapers
Author-email: info@sunscrapers.com
Maintainer: Tomasz Wojcik
Maintainer-email: djoser@tomwojcik.com
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4.0
Classifier: Framework :: Django :: 4.1
Classifier: Framework :: Django :: 4.2
Classifier: Framework :: Django :: 5.0
Classifier: Framework :: Django :: 5.1
Classifier: Framework :: Django :: 5.2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Provides-Extra: djet
Provides-Extra: webauthn
Requires-Dist: django (>=3.2)
Requires-Dist: djangorestframework (>=3.14)
Requires-Dist: djangorestframework-simplejwt (>=5.0,<6.0)
Requires-Dist: djet (>=0.3.0,<0.4.0) ; extra == "djet"
Requires-Dist: social-auth-app-django (>=5.0.0,<6.0.0)
Requires-Dist: webauthn (<1.0) ; extra == "webauthn"
Project-URL: Documentation, https://djoser.readthedocs.io/
Project-URL: Repository, https://github.com/sunscrapers/djoser
Description-Content-Type: text/x-rst
======
djoser
======
.. image:: https://img.shields.io/pypi/v/djoser.svg
:target: https://pypi.org/project/djoser
.. image:: https://github.com/sunscrapers/djoser/actions/workflows/test-suite.yml/badge.svg?branch=master
:target: https://github.com/sunscrapers/djoser/actions?query=branch%3Amaster
:alt: Build Status
.. image:: https://codecov.io/gh/sunscrapers/djoser/branch/master/graph/badge.svg
:target: https://codecov.io/gh/sunscrapers/djoser
.. image:: https://img.shields.io/pypi/dm/djoser
:target: https://img.shields.io/pypi/dm/djoser
.. image:: https://readthedocs.org/projects/djoser/badge/?version=latest
:target: https://djoser.readthedocs.io/en/latest/
:alt: Docs
REST implementation of `Django <https://www.djangoproject.com/>`_ authentication
system. **djoser** library provides a set of `Django Rest Framework <https://www.django-rest-framework.org/>`_
views to handle basic actions such as registration, login, logout, password
reset and account activation. It works with
`custom user model <https://docs.djangoproject.com/en/dev/topics/auth/customizing/>`_.
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 <https://en.wikipedia.org/wiki/Single-page_application>`_
architecture.
Developed by `SUNSCRAPERS <http://sunscrapers.com/>`_ with passion & patience.
.. image:: https://asciinema.org/a/94J4eG2tSBD2iEfF30a6vGtXw.png
:target: https://asciinema.org/a/94J4eG2tSBD2iEfF30a6vGtXw
Requirements
============
To be able to run **djoser** you have to meet the following requirements:
- Python>=3.9,<4.0 (including 3.10, 3.11, and 3.12)
- Django>=3.0.0 (supporting Django 3.2 through 5.1)
- Django REST Framework>=3.12
Installation
============
Simply install using ``pip``:
.. code-block:: bash
$ pip install djoser
And continue with the steps described at
`configuration <https://djoser.readthedocs.io/en/latest/getting_started.html#configuration>`_
guide.
Documentation
=============
Documentation is available to study at
`https://djoser.readthedocs.io <https://djoser.readthedocs.io>`_
and in ``docs`` directory.
Contributing and development
============================
To start developing on **djoser**, clone the repository:
.. code-block:: bash
$ git clone git@github.com:sunscrapers/djoser.git
We use `poetry <https://python-poetry.org/>`_ as dependency management and packaging tool.
.. code-block:: bash
$ cd djoser
$ poetry install --all-extras
This will create a virtualenv with all development dependencies.
To run the test just type:
.. code-block:: bash
$ poetry run pytest
We also prepared a convenient ``Makefile`` to automate commands above:
.. code-block:: bash
$ make init
$ make test
To activate the virtual environment run
.. code-block:: bash
$ poetry shell
Without poetry
--------------
New versions of ``pip`` can use ``pyproject.toml`` to build the package and install its dependencies.
.. code-block:: bash
$ pip install .[test]
.. code-block:: bash
$ cd testproject
$ ./manage.py test
Example project
---------------
You can also play with test project by running following commands:
.. code-block:: bash
$ make migrate
$ make runserver
Commiting your code
-------------------
Before sending patches please make sure you have `pre-commit <https://pre-commit.com/>`_ activated in your local git repository:
.. code-block:: bash
$ poetry 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:
- `django-rest-registration <https://github.com/apragacz/django-rest-registration>`_
- `django-oauth-toolkit <https://github.com/evonove/django-oauth-toolkit>`_
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.
|