{ "info": { "author": "Bishwa Thapa", "author_email": "thapabishwa@aol.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content" ], "description": "# Django Rest User Invitation\n\n[![Build Status](https://travis-ci.org/thapabishwa/drf_simple_invite.svg?branch=develop)](https://travis-ci.org/thapabishwa/drf_simple_invite)\n\nThe primary aim of this python package is to provides a simple user invitation strategy for django rest framework, where users can be invited using invitation tokens (by sending email to the provided e-mail address).\n\nThis package provides a REST endpoint that verifies an token and set the password for that particular user.\n\n## Quick Start\n\n1. Install the package from pypi using pip:\n```bash\npip install drf-simple-invite\n```\n\n2. Add ``drf_simple_invite`` to your ``INSTALLED_APPS`` (after ``rest_framework``) within your Django settings file:\n```python\nINSTALLED_APPS = [\n 'django.contrib.admin',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n\n # Third party apps\n 'rest_framework', # utilities for rest apis\n 'rest_framework.authtoken', # token\n\n # Simple Invite\n 'drf_simple_invite',\n\n # Custom User Model\n 'users',\n]\n```\n\n3. This package provides an endpoint, which can be included by including ``drf_simple_invite.urls`` in your ``urls.py`` as follows:\n```python\nfrom django.conf.urls import url, include\n\nurlpatterns = [\n url(r'api/v1/invite/', include('drf_simple_invite.urls', namespace='drf_simple_invite')),\n] \n```\n**Note**: You can adapt the api-url to your needs.\n\n### Endpoints\n\nThe following endpoints are provided:\n * `POST ${API_URL}/` - invite the user by sending the email as parameter\n * `POST ${API_URL}/{invitation_token}` - set password token by using the ``invitation_token`` parameter\n\nwhere `${API_URL}/` is the url specified in your *urls.py* (e.g., `api/v1/invite/`)\nand `{invitation_token}` is `base64.urlsafe` encoded uuid token. Since it is unsafe to use plain uuid, always make sure that the `{invitation_token}` is `base64.urlsafe` encoded\n\n\n### TODO: Configuration / Settings / Management Command\n\nThe following settings can be set in Django ``settings.py`` file:\n\n* `DJANGO_REST_INVITATION_TOKEN_EXPIRY_TIME` - time in hours about how long the token is active (Default: 24)\n\n **Please note**: expired tokens are automatically cleared based on this setting in every call of ``post`` method on this endpoint.\n\n### Signals\n* ```invitation_token_created(sender, instance, invitation_token)``` - Fired when a reset password token is generated\n* ```pre_password_creation(user)``` - fired just before a password is being set\n* ```post_password_creation(user)``` - fired after a password has been set\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thapabishwa/drf-simple-invite/", "keywords": "", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "drf-simple-invite", "package_url": "https://pypi.org/project/drf-simple-invite/", "platform": "", "project_url": "https://pypi.org/project/drf-simple-invite/", "project_urls": { "Homepage": "https://github.com/thapabishwa/drf-simple-invite/" }, "release_url": "https://pypi.org/project/drf-simple-invite/0.1.13/", "requires_dist": null, "requires_python": "", "summary": "An extension of django rest framework that allows to invite user via email", "version": "0.1.13" }, "last_serial": 5118654, "releases": { "0.1.12": [ { "comment_text": "", "digests": { "md5": "75e5db25df0d6be72d92b444ec5205b4", "sha256": "90074a6af8e245d9d4f842abba96781527094790ec2ab030b7a8de222f5a9afd" }, "downloads": -1, "filename": "drf_simple_invite-0.1.12-py3-none-any.whl", "has_sig": false, "md5_digest": "75e5db25df0d6be72d92b444ec5205b4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10508, "upload_time": "2019-04-07T20:10:27", "url": "https://files.pythonhosted.org/packages/99/30/077616dd9876b1112f72095ddc2939f7bf84216f5cbb688394e0e8f46d9a/drf_simple_invite-0.1.12-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "36229c90de5545b9c114062d800da02a", "sha256": "b4aeed7f7a77c7719ac0a6ea02971eb3ae3362ecab671615575a6e28c0decb01" }, "downloads": -1, "filename": "drf_simple_invite-0.1.12.tar.gz", "has_sig": false, "md5_digest": "36229c90de5545b9c114062d800da02a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4963, "upload_time": "2019-04-07T20:10:28", "url": "https://files.pythonhosted.org/packages/dc/30/c3808ae1c32a0cd86942cf43e7c1e001cc9802e8ed7181526ed36ed202c8/drf_simple_invite-0.1.12.tar.gz" } ], "0.1.13": [ { "comment_text": "", "digests": { "md5": "71b2350992ae95779a74123a56d98aff", "sha256": "0a994cb5c9a86960f679b40140b5f2aaaffdd6bb7b2d281bdf6483f5d4985f1d" }, "downloads": -1, "filename": "drf_simple_invite-0.1.13-py3-none-any.whl", "has_sig": false, "md5_digest": "71b2350992ae95779a74123a56d98aff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10527, "upload_time": "2019-04-09T12:49:21", "url": "https://files.pythonhosted.org/packages/b2/bd/cba2e515056f02f7891281fb77bab64f6a4a97bb87c17ec9eedb3be9625b/drf_simple_invite-0.1.13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3c4ec9e82a248ec3941aeb84ef0ff00", "sha256": "54bfe042425d7fa93ae49b2a958a57b5ab91c25cc86081e70310eed202b21716" }, "downloads": -1, "filename": "drf_simple_invite-0.1.13.tar.gz", "has_sig": false, "md5_digest": "a3c4ec9e82a248ec3941aeb84ef0ff00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4971, "upload_time": "2019-04-09T12:49:22", "url": "https://files.pythonhosted.org/packages/04/dc/9a60c1f8af7180b6a2e96b326e9a466b47bcdc950a9d4fa519212ff7c240/drf_simple_invite-0.1.13.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "71b2350992ae95779a74123a56d98aff", "sha256": "0a994cb5c9a86960f679b40140b5f2aaaffdd6bb7b2d281bdf6483f5d4985f1d" }, "downloads": -1, "filename": "drf_simple_invite-0.1.13-py3-none-any.whl", "has_sig": false, "md5_digest": "71b2350992ae95779a74123a56d98aff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10527, "upload_time": "2019-04-09T12:49:21", "url": "https://files.pythonhosted.org/packages/b2/bd/cba2e515056f02f7891281fb77bab64f6a4a97bb87c17ec9eedb3be9625b/drf_simple_invite-0.1.13-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a3c4ec9e82a248ec3941aeb84ef0ff00", "sha256": "54bfe042425d7fa93ae49b2a958a57b5ab91c25cc86081e70310eed202b21716" }, "downloads": -1, "filename": "drf_simple_invite-0.1.13.tar.gz", "has_sig": false, "md5_digest": "a3c4ec9e82a248ec3941aeb84ef0ff00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4971, "upload_time": "2019-04-09T12:49:22", "url": "https://files.pythonhosted.org/packages/04/dc/9a60c1f8af7180b6a2e96b326e9a466b47bcdc950a9d4fa519212ff7c240/drf_simple_invite-0.1.13.tar.gz" } ] }