django-rest-registration


Namedjango-rest-registration JSON
Version 0.9.0 PyPI version JSON
download
home_pageNone
SummaryUser registration REST API, based on django-rest-framework
upload_time2024-08-31 21:15:46
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseThe MIT License (MIT) Copyright (c) 2015-2024 Andrzej Pragacz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords django rest api auth rest-framework registration register login reset-password register-email change-email sign-up sign-in
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Django REST Registration

[![CircleCI Build Status](https://circleci.com/gh/apragacz/django-rest-registration.svg?style=shield)](https://circleci.com/gh/apragacz/django-rest-registration)
[![Codecov Coverage](https://codecov.io/gh/apragacz/django-rest-registration/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/github/apragacz/django-rest-registration?branch=master)
[![PyPi Version](https://badge.fury.io/py/django-rest-registration.svg)](https://pypi.python.org/pypi/django-rest-registration/)
[![Documentation Status](https://readthedocs.org/projects/django-rest-registration/badge/?version=latest)](https://django-rest-registration.readthedocs.io/en/latest/?badge=latest)

User registration REST API, based on Django REST Framework.

## Documentation

Full documentation for the project is available at [https://django-rest-registration.readthedocs.io/](https://django-rest-registration.readthedocs.io/).

## Requirements

* Django (2.0+, 3.0+, 4.0+, 5.0+) and Django-REST-Framework (3.3+)
* Python 3.7 or higher (no Python 2 support!)

## Features

* Supported views:
    * registration (sign-up) with verification
    * login/logout (sign-in), session- or token-based
    * user profile (retrieving / updating)
    * reset password
    * change password
    * register (change) e-mail
* Views are compatible with [django-rest-swagger](https://github.com/marcgibbons/django-rest-swagger)
* Views can be authenticated via session or auth token
* Modeless (uses the user defined by `settings.AUTH_USER_MODEL` and also uses [cryptographic signing](https://docs.djangoproject.com/en/dev/topics/signing/) instead of profile models)
* Uses [password validation](https://docs.djangoproject.com/en/dev/topics/auth/passwords/#password-validation)
* Heavily tested (Above 98% code coverage)


## Current limitations

*   Supports only one email per user (as model field)
*   No JWT support (but you can easily
    [implement one](https://django-rest-registration.readthedocs.io/en/latest/cookbook/jwt.html)
    or use Django REST Registration along libraries like
    [django-rest-framework-simplejwt](https://github.com/davesque/django-rest-framework-simplejwt))


## Installation & Configuration

You can [install](https://django-rest-registration.readthedocs.io/en/latest/install.html)
Django REST Registration latest version via pip:

    pip install django-rest-registration

Then, you should add it to the `INSTALLED_APPS` so the app templates
for notification emails can be accessed:

```python
INSTALLED_APPS=(
    ...

    'rest_registration',
)
```
After that, you can use the urls in your urlconfig, for instance:

```python
api_urlpatterns = [
    ...

    path('accounts/', include('rest_registration.api.urls')),
]


urlpatterns = [
    ...

    path('api/v1/', include(api_urlpatterns)),
]
```

You can configure Django REST Registration using the `REST_REGISTRATION`
setting in your Django settings (similarly to Django REST Framework).

Below is sample, minimal config you can provide in your django settings which will satisfy the system checks:

```python
REST_REGISTRATION = {
    'REGISTER_VERIFICATION_ENABLED': False,
    'RESET_PASSWORD_VERIFICATION_ENABLED': False,
    'REGISTER_EMAIL_VERIFICATION_ENABLED': False,
}
```

However, the preferred base configuration would be:

```python
REST_REGISTRATION = {
    'REGISTER_VERIFICATION_URL': 'https://frontend-host/verify-user/',
    'RESET_PASSWORD_VERIFICATION_URL': 'https://frontend-host/reset-password/',
    'REGISTER_EMAIL_VERIFICATION_URL': 'https://frontend-host/verify-email/',

    'VERIFICATION_FROM_EMAIL': 'no-reply@example.com',
}
```

The frontend urls are not provided by the library but should be provided
by the user of the library, because Django REST Registration is frontend-agnostic.
The frontend urls will receive parameters as GET query and should pass
them to corresponding REST API views via HTTP POST request.

In case when any verification is enabled (which is the default!),
your Django application needs to be
[properly configured so it can send e-mails](https://docs.djangoproject.com/en/dev/topics/email/).

You can read more about basic configuration
[here](https://django-rest-registration.readthedocs.io/en/latest/quickstart.html).

You can read more about detailed configuration
[here](https://django-rest-registration.readthedocs.io/en/latest/detailed_configuration/).

## Configuration options

You can find all `REST_REGISTRATION` configuration options
[here](https://django-rest-registration.readthedocs.io/en/latest/detailed_configuration/all_settings.html).

## Contributing

If you want to contribute, please refer to separate document [CONTRIBUTING.md](CONTRIBUTING.md).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-rest-registration",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "django, rest, api, auth, rest-framework, registration, register, login, reset-password, register-email, change-email, sign-up, sign-in",
    "author": null,
    "author_email": "Andrzej Pragacz <apragacz@o2.pl>",
    "download_url": "https://files.pythonhosted.org/packages/72/e0/bab3cacb76c12b0a6beae5d532cc5feb4ce7f54c14a144027b22724ef118/django_rest_registration-0.9.0.tar.gz",
    "platform": null,
    "description": "# Django REST Registration\n\n[![CircleCI Build Status](https://circleci.com/gh/apragacz/django-rest-registration.svg?style=shield)](https://circleci.com/gh/apragacz/django-rest-registration)\n[![Codecov Coverage](https://codecov.io/gh/apragacz/django-rest-registration/branch/master/graphs/badge.svg?branch=master)](https://codecov.io/github/apragacz/django-rest-registration?branch=master)\n[![PyPi Version](https://badge.fury.io/py/django-rest-registration.svg)](https://pypi.python.org/pypi/django-rest-registration/)\n[![Documentation Status](https://readthedocs.org/projects/django-rest-registration/badge/?version=latest)](https://django-rest-registration.readthedocs.io/en/latest/?badge=latest)\n\nUser registration REST API, based on Django REST Framework.\n\n## Documentation\n\nFull documentation for the project is available at [https://django-rest-registration.readthedocs.io/](https://django-rest-registration.readthedocs.io/).\n\n## Requirements\n\n* Django (2.0+, 3.0+, 4.0+, 5.0+) and Django-REST-Framework (3.3+)\n* Python 3.7 or higher (no Python 2 support!)\n\n## Features\n\n* Supported views:\n    * registration (sign-up) with verification\n    * login/logout (sign-in), session- or token-based\n    * user profile (retrieving / updating)\n    * reset password\n    * change password\n    * register (change) e-mail\n* Views are compatible with [django-rest-swagger](https://github.com/marcgibbons/django-rest-swagger)\n* Views can be authenticated via session or auth token\n* Modeless (uses the user defined by `settings.AUTH_USER_MODEL` and also uses [cryptographic signing](https://docs.djangoproject.com/en/dev/topics/signing/) instead of profile models)\n* Uses [password validation](https://docs.djangoproject.com/en/dev/topics/auth/passwords/#password-validation)\n* Heavily tested (Above 98% code coverage)\n\n\n## Current limitations\n\n*   Supports only one email per user (as model field)\n*   No JWT support (but you can easily\n    [implement one](https://django-rest-registration.readthedocs.io/en/latest/cookbook/jwt.html)\n    or use Django REST Registration along libraries like\n    [django-rest-framework-simplejwt](https://github.com/davesque/django-rest-framework-simplejwt))\n\n\n## Installation & Configuration\n\nYou can [install](https://django-rest-registration.readthedocs.io/en/latest/install.html)\nDjango REST Registration latest version via pip:\n\n    pip install django-rest-registration\n\nThen, you should add it to the `INSTALLED_APPS` so the app templates\nfor notification emails can be accessed:\n\n```python\nINSTALLED_APPS=(\n    ...\n\n    'rest_registration',\n)\n```\nAfter that, you can use the urls in your urlconfig, for instance:\n\n```python\napi_urlpatterns = [\n    ...\n\n    path('accounts/', include('rest_registration.api.urls')),\n]\n\n\nurlpatterns = [\n    ...\n\n    path('api/v1/', include(api_urlpatterns)),\n]\n```\n\nYou can configure Django REST Registration using the `REST_REGISTRATION`\nsetting in your Django settings (similarly to Django REST Framework).\n\nBelow is sample, minimal config you can provide in your django settings which will satisfy the system checks:\n\n```python\nREST_REGISTRATION = {\n    'REGISTER_VERIFICATION_ENABLED': False,\n    'RESET_PASSWORD_VERIFICATION_ENABLED': False,\n    'REGISTER_EMAIL_VERIFICATION_ENABLED': False,\n}\n```\n\nHowever, the preferred base configuration would be:\n\n```python\nREST_REGISTRATION = {\n    'REGISTER_VERIFICATION_URL': 'https://frontend-host/verify-user/',\n    'RESET_PASSWORD_VERIFICATION_URL': 'https://frontend-host/reset-password/',\n    'REGISTER_EMAIL_VERIFICATION_URL': 'https://frontend-host/verify-email/',\n\n    'VERIFICATION_FROM_EMAIL': 'no-reply@example.com',\n}\n```\n\nThe frontend urls are not provided by the library but should be provided\nby the user of the library, because Django REST Registration is frontend-agnostic.\nThe frontend urls will receive parameters as GET query and should pass\nthem to corresponding REST API views via HTTP POST request.\n\nIn case when any verification is enabled (which is the default!),\nyour Django application needs to be\n[properly configured so it can send e-mails](https://docs.djangoproject.com/en/dev/topics/email/).\n\nYou can read more about basic configuration\n[here](https://django-rest-registration.readthedocs.io/en/latest/quickstart.html).\n\nYou can read more about detailed configuration\n[here](https://django-rest-registration.readthedocs.io/en/latest/detailed_configuration/).\n\n## Configuration options\n\nYou can find all `REST_REGISTRATION` configuration options\n[here](https://django-rest-registration.readthedocs.io/en/latest/detailed_configuration/all_settings.html).\n\n## Contributing\n\nIf you want to contribute, please refer to separate document [CONTRIBUTING.md](CONTRIBUTING.md).\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2015-2024 Andrzej Pragacz  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  ",
    "summary": "User registration REST API, based on django-rest-framework",
    "version": "0.9.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/apragacz/django-rest-registration/issues",
        "Documentation": "https://django-rest-registration.readthedocs.io/",
        "Source Code": "https://github.com/apragacz/django-rest-registration",
        "homepage": "https://github.com/apragacz/django-rest-registration"
    },
    "split_keywords": [
        "django",
        " rest",
        " api",
        " auth",
        " rest-framework",
        " registration",
        " register",
        " login",
        " reset-password",
        " register-email",
        " change-email",
        " sign-up",
        " sign-in"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fffa265c5026e4a3a4d65a07e19d5e7ecc6970abe613ab3c946fde4e5e4a06a2",
                "md5": "e57dc63f36b5b219e41a539f854c0c8d",
                "sha256": "3260b0bc53246866dd857d577605b9fe6daf7890ed25fe7658d5885a602db110"
            },
            "downloads": -1,
            "filename": "django_rest_registration-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e57dc63f36b5b219e41a539f854c0c8d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 60002,
            "upload_time": "2024-08-31T21:15:45",
            "upload_time_iso_8601": "2024-08-31T21:15:45.119565Z",
            "url": "https://files.pythonhosted.org/packages/ff/fa/265c5026e4a3a4d65a07e19d5e7ecc6970abe613ab3c946fde4e5e4a06a2/django_rest_registration-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "72e0bab3cacb76c12b0a6beae5d532cc5feb4ce7f54c14a144027b22724ef118",
                "md5": "eeab477ac2ffdc457ab35a25ebaf92e2",
                "sha256": "a8cb87b419cdafa434298c8fa492df81b26505412c50df43098bef8d16d0ad8a"
            },
            "downloads": -1,
            "filename": "django_rest_registration-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "eeab477ac2ffdc457ab35a25ebaf92e2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 39104,
            "upload_time": "2024-08-31T21:15:46",
            "upload_time_iso_8601": "2024-08-31T21:15:46.736270Z",
            "url": "https://files.pythonhosted.org/packages/72/e0/bab3cacb76c12b0a6beae5d532cc5feb4ce7f54c14a144027b22724ef118/django_rest_registration-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-31 21:15:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "apragacz",
    "github_project": "django-rest-registration",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "tox": true,
    "lcname": "django-rest-registration"
}
        
Elapsed time: 0.97172s