METADATA 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. Metadata-Version: 2.1
  2. Name: djoser
  3. Version: 2.1.0
  4. Summary: REST implementation of Django authentication system.
  5. Home-page: https://github.com/sunscrapers/djoser
  6. License: MIT
  7. Author: Sunscrapers
  8. Author-email: info@sunscrapers.com
  9. Maintainer: Tomasz Wójcik
  10. Maintainer-email: t.wojcik@sunscrapers.com
  11. Requires-Python: >=3.6.1,<4.0.0
  12. Classifier: Development Status :: 5 - Production/Stable
  13. Classifier: Framework :: Django
  14. Classifier: Framework :: Django :: 2.2
  15. Classifier: Framework :: Django :: 3.1
  16. Classifier: Intended Audience :: Developers
  17. Classifier: License :: OSI Approved :: MIT License
  18. Classifier: Operating System :: OS Independent
  19. Classifier: Programming Language :: Python
  20. Classifier: Programming Language :: Python :: 3
  21. Classifier: Programming Language :: Python :: 3.6
  22. Classifier: Programming Language :: Python :: 3.7
  23. Classifier: Programming Language :: Python :: 3.8
  24. Classifier: Programming Language :: Python :: 3.9
  25. Provides-Extra: test
  26. Requires-Dist: asgiref (>=3.2.10,<4.0.0)
  27. Requires-Dist: codecov (>=2.0.16,<3.0.0); extra == "test"
  28. Requires-Dist: coreapi (>=2.3.3,<3.0.0)
  29. Requires-Dist: coverage (>=5.3,<6.0); extra == "test"
  30. Requires-Dist: django-templated-mail (>=1.1.1,<2.0.0)
  31. Requires-Dist: djangorestframework-simplejwt (>=4.3.0,<5.0.0)
  32. Requires-Dist: djet (>=0.2.2,<0.3.0); extra == "test"
  33. Requires-Dist: importlib-metadata (>=1.0,<2.0); python_version < "3.8"
  34. Requires-Dist: pytest (>=6.0.2,<7.0.0); extra == "test"
  35. Requires-Dist: pytest-cov (>=2.10.1,<3.0.0); extra == "test"
  36. Requires-Dist: pytest-django (>=3.10.0,<4.0.0); extra == "test"
  37. Requires-Dist: pytest-pythonpath (>=0.7.3,<0.8.0); extra == "test"
  38. Requires-Dist: social-auth-app-django (>=4.0.0,<5.0.0)
  39. Project-URL: Documentation, https://djoser.readthedocs.io/
  40. Project-URL: Repository, https://github.com/sunscrapers/djoser
  41. Description-Content-Type: text/x-rst
  42. ======
  43. djoser
  44. ======
  45. .. image:: https://img.shields.io/pypi/v/djoser.svg
  46. :target: https://pypi.org/project/djoser
  47. .. image:: https://img.shields.io/travis/sunscrapers/djoser/master.svg
  48. :target: https://travis-ci.org/sunscrapers/djoser
  49. .. image:: https://img.shields.io/codecov/c/github/sunscrapers/djoser.svg
  50. :target: https://codecov.io/gh/sunscrapers/djoser
  51. .. image:: https://api.codacy.com/project/badge/Grade/c9bf80318d2741e5bb63912a5e0b32dc
  52. :alt: Codacy Badge
  53. :target: https://app.codacy.com/app/dekoza/djoser?utm_source=github.com&utm_medium=referral&utm_content=sunscrapers/djoser&utm_campaign=Badge_Grade_Dashboard
  54. .. image:: https://img.shields.io/pypi/dm/djoser
  55. :target: https://img.shields.io/pypi/dm/djoser
  56. REST implementation of `Django <https://www.djangoproject.com/>`_ authentication
  57. system. **djoser** library provides a set of `Django Rest Framework <https://www.django-rest-framework.org/>`_
  58. views to handle basic actions such as registration, login, logout, password
  59. reset and account activation. It works with
  60. `custom user model <https://docs.djangoproject.com/en/dev/topics/auth/customizing/>`_.
  61. Instead of reusing Django code (e.g. ``PasswordResetForm``), we reimplemented
  62. few things to fit better into `Single Page App <https://en.wikipedia.org/wiki/Single-page_application>`_
  63. architecture.
  64. Developed by `SUNSCRAPERS <http://sunscrapers.com/>`_ with passion & patience.
  65. .. image:: https://asciinema.org/a/94J4eG2tSBD2iEfF30a6vGtXw.png
  66. :target: https://asciinema.org/a/94J4eG2tSBD2iEfF30a6vGtXw
  67. Requirements
  68. ============
  69. To be able to run **djoser** you have to meet following requirements:
  70. - Python (3.6, 3.7, 3.8, 3.9)
  71. - Django (2.2, 3.1)
  72. - Django REST Framework 3.11.1
  73. If you need to support other versions, please use djoser<2.
  74. Installation
  75. ============
  76. Simply install using ``pip``:
  77. .. code-block:: bash
  78. $ pip install djoser
  79. And continue with the steps described at
  80. `configuration <https://djoser.readthedocs.io/en/latest/getting_started.html#configuration>`_
  81. guide.
  82. Documentation
  83. =============
  84. Documentation is available to study at
  85. `https://djoser.readthedocs.io <https://djoser.readthedocs.io>`_
  86. and in ``docs`` directory.
  87. Contributing and development
  88. ============================
  89. To start developing on **djoser**, clone the repository:
  90. .. code-block:: bash
  91. $ git clone git@github.com:sunscrapers/djoser.git
  92. We use `poetry <https://python-poetry.org/>`_ as dependency management and packaging tool.
  93. .. code-block:: bash
  94. $ cd djoser
  95. $ poetry install -E test
  96. This will create a virtualenv with all development dependencies.
  97. To run the test just type:
  98. .. code-block:: bash
  99. $ poetry run py.test testproject
  100. We also preapred a convenient ``Makefile`` to automate commands above:
  101. .. code-block:: bash
  102. $ make init
  103. $ make test
  104. To activate the virtual environment run
  105. .. code-block:: bash
  106. $ poetry shell
  107. Without poetry
  108. --------------
  109. New versions of ``pip`` can use ``pyproject.toml`` to build the package and install its dependencies.
  110. .. code-block:: bash
  111. $ pip install .[test]
  112. .. code-block:: bash
  113. $ cd testproject
  114. $ ./manage.py test
  115. Tox
  116. ---
  117. If you need to run tests against all supported Python and Django versions then invoke:
  118. .. code-block:: bash
  119. $ poetry run tox -p all
  120. Example project
  121. ---------------
  122. You can also play with test project by running following commands:
  123. .. code-block:: bash
  124. $ make migrate
  125. $ make runserver
  126. Commiting your code
  127. -------------------
  128. Before sending patches please make sure you have `pre-commit <https://pre-commit.com/>`_ activated in your local git repository:
  129. .. code-block:: bash
  130. $ pre-commit install
  131. This will ensure that your code is cleaned before you commit it.
  132. Some steps (like black) automatically fix issues but the show their status as FAILED.
  133. Just inspect if eveything is OK, git-add the files and retry the commit.
  134. Other tools (like flake8) require you to manually fix the issues.
  135. Similar projects
  136. ================
  137. List of projects related to Django, REST and authentication:
  138. - `django-rest-framework-simplejwt <https://github.com/davesque/django-rest-framework-simplejwt>`_
  139. - `django-oauth-toolkit <https://github.com/evonove/django-oauth-toolkit>`_
  140. - `django-rest-auth <https://github.com/Tivix/django-rest-auth>`_ (not maintained)
  141. - `django-rest-framework-digestauth <https://github.com/juanriaza/django-rest-framework-digestauth>`_ (not maintained)
  142. Please, keep in mind that while using custom authentication and TokenCreateSerializer
  143. validation, there is a path that **ignores intentional return of None** from authenticate()
  144. and try to find User using parameters. Probably, that will be changed in the future.