{ "info": { "author": "Shreyas & Paul", "author_email": "backend@fueled.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: Django", "Framework :: Django :: 1.8", "Framework :: Django :: 1.9", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "=============================\nverification\n=============================\n\n.. image:: https://travis-ci.org/Fueled/django-user-verification.png?branch=master\n :target: https://travis-ci.org/Fueled/django-user-verification\n\nPackage to help out with verifying new users.\n\nDocumentation\n-------------\n\nThe full documentation is at https://django-user-verification.readthedocs.org.\n\nQuickstart\n----------\n\nInstall verification::\n\n pip install django-user-verification\n\nThen use it in a project::\n\n import verification\n\nUsage\n--------\n\nDefining Environment Variables for Backend\n===========================================\n\nIn your settings file (e.g. common.py), define your credentials and any environment variables required for your backend service (e.g. Sendgrid, Twilio). This is how django-user-verification will actually send its verification link to whichever clients.\n\nAlso, add \"verification\" in your **INSTALLED_APPS** that's in your settings file.\n\nFor example, we define backend env variables in our settings file for Phone (Twilio) and Email:\n\n.. code-block:: python\n\n USER_VERIFICATION = {\n 'phone': {\n 'BACKEND': 'verification.backends.twilio.TwilioBackend',\n 'OPTIONS': {\n 'SID': os.getenv('TWILIO_API_SID'),\n 'SECRET': os.getenv('TWILIO_API_SECRET'),\n 'FROM': os.getenv('TWILIO_FROM'),\n 'MESSAGE': \"Welcome, continue with this link: {link}\"\n },\n 'APP_URL': 'app://'\n },\n 'email': {\n 'BACKEND': 'verification.backends.email.EmailBackend',\n 'OPTIONS': {\n 'FROM': os.getenv('FROM_EMAIL', default='dummy@fueled.com')\n },\n 'APP_URL': 'app://'\n },\n\n }\n\nThen, go to your `urls.py` file and insert the following in your `urlpatterns`:\n\n.. code-block:: python\n\n url(r'^verification/', include(\"verification.urls\")),\n\n\nAn example `POST` request for sending to a phone number:\n\n``/verify/send/phone/``\n\nand the payload being:\n\n {\n \"email\": \"joe@doe.com\" \n }\n\n\nAnother example request for sending to an email is:\n\n``/verify/send/email/``\n\nwith the payload being:\n\n {\n \"email\": \"joe@doe.com\" \n }\n\n\nConfiguration\n--------------\nYou can user multiple verification backends, such as a `phone` or `email` backend. Inside these verification types we can set multiple `OPTIONS`, for example we could set up the `phone` verification type:\n\n.. code::\n USER_VERIFICATION = {\n 'phone': {\n 'BACKEND': 'verification.backends.twilio.TwilioBackend',\n 'OPTIONS': {\n 'SID': os.getenv('TWILIO_API_SID'),\n 'SECRET': os.getenv('TWILIO_API_SECRET'),\n 'FROM': os.getenv('TWILIO_FROM'),\n 'MESSAGE': \"Welcome, continue with this link: {link}\"\n },\n 'APP_URL': 'app://',\n 'GENERATOR': 'verification.generators.NumberGenerator'\n }\n }\n\n\n**BACKEND**: The import path of a verification type. There are multiple verification backends available:\n- `verification.backends.twilio.TwilioBackend`: Twilio backend for sending SMS, needs `SID`, `SECRET`, `FROM` and optionally `MESSAGE`\n- `verification.backends.email.EmailBackend`: Email backend, uses Django default email handler, no options needed\n\n**OPTIONS**: These are options specific for the backend\n\n**APP_URL**: The App URL to redirect to, currently iOS Only\n\n**GENERATOR**: The generator of the keys that are stored in the cache, default it is a 5 digit number\n\nVerification\n-----------------\nThis package solely creates a way to verify a phone number or email, but we decided we wanted to be able to add additional resources to the verification process, such as registration when pin number is correct. For that we made a serializer for you to use, which handles the validation of the pin for you.\n\nTo use the serializer we just have to extend the `verification.serializers.VerificationSerializer`, like so:\n\n.. code-block:: python\n class MyOwnVerificationSerializer(VerificationSerializer):\n email = serializers.CharField()\n token = serializers.CharField()\n\n class Meta:\n verification_type = 'email'\n token_field = 'token'\n\n**NOTE**: We have to add `verification_type` as minimum so that we know which flow we are using (e.g. `email` or `phone`)\n\n\n\nRunning Tests\n--------------\n\nDoes the code actually work?\n\n.. code-block:: bash\n\n source /bin/activate\n (myenv) $ pip install -r requirements-test.txt\n (myenv) $ python runtests.py\n\nContributing\n--------------\nFeel free to create issues or open pull requests, we would love to see your contributions coming in!\n\n\n\n\nHistory\n-------\n\n0.1.0 (2016-02-01)\n++++++++++++++++++\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Fueled/django-user-verification", "keywords": "django-user-verification", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-user-verification", "package_url": "https://pypi.org/project/django-user-verification/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-user-verification/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Fueled/django-user-verification" }, "release_url": "https://pypi.org/project/django-user-verification/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Package to help out with verifying new users.", "version": "0.1.2" }, "last_serial": 2129581, "releases": { "0.1.0": [], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b4be7fd6f6063b23e0b9865b18f1b50c", "sha256": "057f01601400ff695c69c79e375e4c419b79c3add76f2cefa0ae6278a4a71574" }, "downloads": -1, "filename": "django_user_verification-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4be7fd6f6063b23e0b9865b18f1b50c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23594, "upload_time": "2016-05-23T17:49:34", "url": "https://files.pythonhosted.org/packages/2f/da/dd2b75ffc7e566db3237b80db651d07ba0871d3c48cff966a1e3c6deacba/django_user_verification-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "90d83ab01087d056bc4411a9324a1121", "sha256": "00ff6e5f3db01b5dba638254682b1bdee1a9dcfe56c1cddb1d7740a87682fef9" }, "downloads": -1, "filename": "django-user-verification-0.1.2.tar.gz", "has_sig": false, "md5_digest": "90d83ab01087d056bc4411a9324a1121", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10865, "upload_time": "2016-05-23T17:49:25", "url": "https://files.pythonhosted.org/packages/2a/31/d70af97997dc6b65415f0bebebbbb8003ddc8eac4cbe2ea14b8acf6053f2/django-user-verification-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b4be7fd6f6063b23e0b9865b18f1b50c", "sha256": "057f01601400ff695c69c79e375e4c419b79c3add76f2cefa0ae6278a4a71574" }, "downloads": -1, "filename": "django_user_verification-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4be7fd6f6063b23e0b9865b18f1b50c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23594, "upload_time": "2016-05-23T17:49:34", "url": "https://files.pythonhosted.org/packages/2f/da/dd2b75ffc7e566db3237b80db651d07ba0871d3c48cff966a1e3c6deacba/django_user_verification-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "90d83ab01087d056bc4411a9324a1121", "sha256": "00ff6e5f3db01b5dba638254682b1bdee1a9dcfe56c1cddb1d7740a87682fef9" }, "downloads": -1, "filename": "django-user-verification-0.1.2.tar.gz", "has_sig": false, "md5_digest": "90d83ab01087d056bc4411a9324a1121", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10865, "upload_time": "2016-05-23T17:49:25", "url": "https://files.pythonhosted.org/packages/2a/31/d70af97997dc6b65415f0bebebbbb8003ddc8eac4cbe2ea14b8acf6053f2/django-user-verification-0.1.2.tar.gz" } ] }