django-rest-registration


Namedjango-rest-registration JSON
Version 0.8.3 PyPI version JSON
download
home_page
SummaryUser registration REST API, based on django-rest-framework
upload_time2023-12-04 23:14:41
maintainer
docs_urlNone
author
requires_python>=3.5
licenseThe MIT License (MIT) Copyright (c) 2015-2023 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+) and Django-REST-Framework (3.3+)
* Python 3.5 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 use it 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": "",
    "name": "django-rest-registration",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.5",
    "maintainer_email": "",
    "keywords": "django,rest,api,auth,rest-framework,registration,register,login,reset-password,register-email,change-email,sign-up,sign-in",
    "author": "",
    "author_email": "Andrzej Pragacz <apragacz@o2.pl>",
    "download_url": "https://files.pythonhosted.org/packages/1e/dc/bc46cef6cad1db9fccfd02c4aa0166724600e02b10dec97a94a5186941e8/django-rest-registration-0.8.3.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+) and Django-REST-Framework (3.3+)\n* Python 3.5 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 use it along libraries like [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-2023 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.8.3",
    "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": "536d6f2f45d52c8aa823db4010d3905c446326ae7d8542653f8f0a07c8421078",
                "md5": "6f78e1eafdd6e8dd863fc6771ab79724",
                "sha256": "db6c241073cf76cbe8381bebf94d86ba97c9cd068474bf4cf290c35866aec6d9"
            },
            "downloads": -1,
            "filename": "django_rest_registration-0.8.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f78e1eafdd6e8dd863fc6771ab79724",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.5",
            "size": 59917,
            "upload_time": "2023-12-04T23:14:37",
            "upload_time_iso_8601": "2023-12-04T23:14:37.162922Z",
            "url": "https://files.pythonhosted.org/packages/53/6d/6f2f45d52c8aa823db4010d3905c446326ae7d8542653f8f0a07c8421078/django_rest_registration-0.8.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1edcbc46cef6cad1db9fccfd02c4aa0166724600e02b10dec97a94a5186941e8",
                "md5": "a3fb5a92c7596b911412687f2e68faf5",
                "sha256": "8ef0bbc5a88af854eb6dd11d1614bb71c41a578a6469b48d1a5478683bf8a0c4"
            },
            "downloads": -1,
            "filename": "django-rest-registration-0.8.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a3fb5a92c7596b911412687f2e68faf5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.5",
            "size": 39574,
            "upload_time": "2023-12-04T23:14:41",
            "upload_time_iso_8601": "2023-12-04T23:14:41.555529Z",
            "url": "https://files.pythonhosted.org/packages/1e/dc/bc46cef6cad1db9fccfd02c4aa0166724600e02b10dec97a94a5186941e8/django-rest-registration-0.8.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-04 23:14:41",
    "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.15097s