{ "info": { "author": "Nexmo Developer Relations", "author_email": "devrel@nexmo.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django :: 2.0", "Framework :: Django :: 2.1", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Communications :: Telephony" ], "description": "# DJ-Nexmo\n\n[![PyPI version](https://badge.fury.io/py/dj-nexmo.svg)](https://badge.fury.io/py/dj-nexmo)\n[![Build Status](https://api.travis-ci.org/Nexmo/dj-nexmo.svg?branch=master)](https://travis-ci.org/Nexmo/dj-nexmo)\n[![Coverage Status](https://coveralls.io/repos/github/Nexmo/dj-nexmo/badge.svg?branch=master)](https://coveralls.io/github/Nexmo/dj-nexmo?branch=master)\n\nThe [Nexmo API] is _awesome_ - but there are some problems that developers using Nexmo need to solve again and again.\nThis Django app provides Django-specific functionality on top of the [Nexmo Client Library for Python]! Currently it contains:\n\n* A decorator for validating and re-combining SMS message parts.\n* Template filters for rendering phone numbers in international and national formats.\n\n\n## How To Install It\n\nCurrently, `dj-nexmo` **only** supports Python 3.4+, and Django 2.0+. We _may_ backport to Django 1.x, but we have no intention of backporting to Python 2.\n\nFirst, `pip install dj-nexmo`\n\nAdd `\"djnexmo\"` to `INSTALLED_APPS` in your settings.\n\nRun `python manage.py migrate djnexmo` to create the necessary models.\n\n\n## Configuration\n\n### `NEXMO_API_KEY`\n\nThis optional setting should be set to your Nexmo API Key, which you can obtain from the dashboard.\n\n### `NEXMO_API_SECRET`\n\nThis optional setting should be set to your Nexmo API Secret, which you can obtain from the dashboard.\n\n### `NEXMO_SIGNATURE_SECRET`\n\nThis optional setting should be set to your Nexmo Signature Secret, which you can obtain by contacting Nexmo support.\nYou will need this setting if you wish to validate incoming SMS.\n\n### `NEXMO_SIGNATURE_METHOD`\n\nThis optional setting should be set to your Nexmo signing method, which you should obtain from Nexmo support when you\nobtain your Nexmo signature secret.\n\n### `NEXMO_APPLICATION_ID`\n\nThis optional setting should be set to the ID of a Nexmo Voice application.\n\n### `NEXMO_PRIVATE_KEY`\n\nThis optional setting should be set to your Nexmo Voice application's private key, or a path to a file containing\nyour private key.\n\n\n## Using the Nexmo Client\n\n`dj-nexmo` configures a Nexmo `Client` object from the settings above. You can\nuse it by importing it from the `djnexmo` package:\n\n```python\nfrom djnexmo import client\n\nclient.send_sms({\n 'to': '447700900301',\n 'from': '447700900414',\n 'text': 'Hello from DJ Nexmo!'\n})\n```\n\n\n## Incoming SMS\n\n`dj-nexmo` provides a view decorator which will ensure your webhook view is only called once all the parts of an SMS are\navailable.\n\n```python\n# This will automatically check the signature of the incoming request.\n# The view will only be called once all parts of the SMS have arrived.\n@sms_webhook\ndef sms_registration(request):\n # Your parsed & merged SMS message will be available as `request.sms`:\n sms = request.sms\n\n # Don't do any long processing here - you should return a 200 response as soon as possible.\n ...\n\n return HttpResponse(\"OK\")\n```\n\n\n## Formatting Phone Numbers\n\n`dj-nexmo` adds a couple of template filters for formatting phone numbers, wrapping the awesome\n[phonenumbers] library.\n\n```html\n{% load phonenumbers %}\n\nInternational: {{ \"447700900486\" | international }} => +44 7700 900486\nLocal Format: {{ \"447700900486\" | national }} => 07700 900486\n```\n\n## Coming Soon:\n\n* A management command for clearing the database of old message parts where not all parts were received.\n* A decorator to validate other webhooks from the Nexmo API.\n\n\n## License\n\nThis code is open-source, released under the Apache License. This means it is free to use\nfor commercial or non-commercial purposes, and you can make any changes you would like or need.\n\n\n## Contribute!\n\nWe :heart: contributions -- if you'd like help contributing to this project, please contact us!\nIf you want to do anything particularly significant, we recommend you open up an issue\nto discuss it with us first. If there's something you'd like to see, please open an issue for that\ntoo! If you find a bug, please create an issue - any help you can give providing a small code sample that\ndemonstrates the problem you've seen would be very useful and means we should be able to solve\nyour problem sooner!\n\n[Nexmo API]: https://developer.nexmo.com/\n[phonenumbers]: https://github.com/daviddrysdale/python-phonenumbers\n[Nexmo Client Library for Python]: https://github.com/nexmo/nexmo-python\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Nexmo/dj-nexmo/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dj-nexmo", "package_url": "https://pypi.org/project/dj-nexmo/", "platform": "", "project_url": "https://pypi.org/project/dj-nexmo/", "project_urls": { "Homepage": "https://github.com/Nexmo/dj-nexmo/" }, "release_url": "https://pypi.org/project/dj-nexmo/0.0.4/", "requires_dist": [ "nexmo (~=2.0)", "django (~=2.0)", "attrs (~=17.4)", "marshmallow (>=3.0.0rc3)", "phonenumbers (~=8.9)" ], "requires_python": ">=3.4", "summary": "Utilities for Django developers using Nexmo's APIs", "version": "0.0.4" }, "last_serial": 4707984, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "172a2031ecd2e0d37ac67898c0b577e4", "sha256": "5ed548df7fe1b92680ddd2c878e57010e5475fda2e46e73ad9fad6dd140c194a" }, "downloads": -1, "filename": "dj_nexmo-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "172a2031ecd2e0d37ac67898c0b577e4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11272, "upload_time": "2018-06-15T15:06:58", "url": "https://files.pythonhosted.org/packages/27/6b/c9e5696630b162f17360a8ba0f106d96ffef58fcf150c879c2f42ab6f290/dj_nexmo-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ff13ebbe9edc32820cbf20820d2bc1cf", "sha256": "ca960f7660f79bd081adb97b8f9614cdfa61b18ff74a21661b19e8668fd9d52f" }, "downloads": -1, "filename": "dj-nexmo-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ff13ebbe9edc32820cbf20820d2bc1cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21565, "upload_time": "2018-06-15T15:06:59", "url": "https://files.pythonhosted.org/packages/be/ed/a3ef771ce9da596f3158972b0dfbe30d66cec2eed739f5d5680fc16d1057/dj-nexmo-0.0.1.tar.gz" } ], "0.0.1.dev0": [ { "comment_text": "", "digests": { "md5": "5d8cb488b04a29db87d8d8e7ee25e24d", "sha256": "e7f374cc9a66163d62e8f1305cae9d19f31afa57134cd163c58b68ff8ff7f4c3" }, "downloads": -1, "filename": "dj_nexmo-0.0.1.dev0-py3-none-any.whl", "has_sig": false, "md5_digest": "5d8cb488b04a29db87d8d8e7ee25e24d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11327, "upload_time": "2018-06-15T14:29:35", "url": "https://files.pythonhosted.org/packages/3f/50/7f621ee225b6c5c27f38790f1c098560235e7eaf530136428487fb68c711/dj_nexmo-0.0.1.dev0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c1c6926068b75a33d5c89be1279f945", "sha256": "b2d36637f941f8a29b77276a25fba6bf19ec86d78cad415168e1bb72bb0a29bc" }, "downloads": -1, "filename": "dj-nexmo-0.0.1.dev0.tar.gz", "has_sig": false, "md5_digest": "6c1c6926068b75a33d5c89be1279f945", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21526, "upload_time": "2018-06-15T14:29:36", "url": "https://files.pythonhosted.org/packages/50/e0/938fc583a4d54ea556bffede35c87105a4fbd82ef04fe66ef13c7e8025be/dj-nexmo-0.0.1.dev0.tar.gz" } ], "0.0.1.dev2": [ { "comment_text": "", "digests": { "md5": "da03b72093ceeb828c7dceca491bcc8a", "sha256": "7644c67f69e05253965d3975a5e8c1c8e923c3177b7299a2870c6fedf28de5f5" }, "downloads": -1, "filename": "dj_nexmo-0.0.1.dev2-py3-none-any.whl", "has_sig": false, "md5_digest": "da03b72093ceeb828c7dceca491bcc8a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11328, "upload_time": "2018-06-15T14:53:51", "url": "https://files.pythonhosted.org/packages/80/d5/e3fd62aae899f229d34d462e7e9503d84e223fba5315b5e05ea802feb4b9/dj_nexmo-0.0.1.dev2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec7fd35ed07a2f68fc175967b7b37edc", "sha256": "233b075ce8902030a3beb80f659914cc882ca47ddd60be3ac693d51644ce7f97" }, "downloads": -1, "filename": "dj-nexmo-0.0.1.dev2.tar.gz", "has_sig": false, "md5_digest": "ec7fd35ed07a2f68fc175967b7b37edc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21547, "upload_time": "2018-06-15T14:53:52", "url": "https://files.pythonhosted.org/packages/63/cd/102bad378df2dc0b41f52cea9df3a1d44ecd406367546caae9f443cfcd3a/dj-nexmo-0.0.1.dev2.tar.gz" } ], "0.0.1.dev3": [ { "comment_text": "", "digests": { "md5": "14a20b147006082bc1bc4b95018d59b9", "sha256": "c22daadf088003deb619f12fe2677c11f6bf36ebd1ce6d54f5792bd6d25e4d48" }, "downloads": -1, "filename": "dj_nexmo-0.0.1.dev3-py3-none-any.whl", "has_sig": false, "md5_digest": "14a20b147006082bc1bc4b95018d59b9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11357, "upload_time": "2018-06-15T15:00:52", "url": "https://files.pythonhosted.org/packages/b9/fa/a80dddc691cf3de6abe89843e2cd5c142f06dbdeed2adf59deef0fc73744/dj_nexmo-0.0.1.dev3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4aa30078d026ac0c9832dfcd00ff3fb7", "sha256": "c8c471c9c7b95f0461b275287c8dffecd31c7b6dde0b199b1ed7dac8394be3e2" }, "downloads": -1, "filename": "dj-nexmo-0.0.1.dev3.tar.gz", "has_sig": false, "md5_digest": "4aa30078d026ac0c9832dfcd00ff3fb7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21578, "upload_time": "2018-06-15T15:00:54", "url": "https://files.pythonhosted.org/packages/88/69/65015d95745fd46ecb870e369b01dfe189dcbf66fad974be6c4d20af4fa0/dj-nexmo-0.0.1.dev3.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "43e7690b179ed80afb811ef6521ff323", "sha256": "ad60a5aacb37c9d4ecdc7f07a814b4ccff4e8b4a03bd009c4451a33a9cfae3b9" }, "downloads": -1, "filename": "dj_nexmo-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "43e7690b179ed80afb811ef6521ff323", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 11446, "upload_time": "2019-01-17T09:50:58", "url": "https://files.pythonhosted.org/packages/43/c3/2f0f7b0076af2b5d7d16d6df390cd3353bdab4666af538c0d6b9fccc463f/dj_nexmo-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "61f118537c64d594af0391bd4b6858fa", "sha256": "4583c3d6bdeb964ce82c44caedcdc31de69a2f22c09ce5a51e7aa5dce35d6f67" }, "downloads": -1, "filename": "dj-nexmo-0.0.2.tar.gz", "has_sig": false, "md5_digest": "61f118537c64d594af0391bd4b6858fa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 22997, "upload_time": "2019-01-17T09:51:00", "url": "https://files.pythonhosted.org/packages/bb/4a/86d2fad0bcde7885886ce4b742fd8efa17501bba7a3ec156542df3c983d8/dj-nexmo-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "a52f003a408ba1145a56307891516c67", "sha256": "8a41d85fa3cc2994dbde0198c822fa9aecc5c81a72d57790c9a13fa31ea83bf6" }, "downloads": -1, "filename": "dj_nexmo-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "a52f003a408ba1145a56307891516c67", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 11443, "upload_time": "2019-01-17T12:48:11", "url": "https://files.pythonhosted.org/packages/50/7d/2facbda5e69dee514e8e5117236518da4c27cca5667e81032caf86a9cb07/dj_nexmo-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3e1b5d309302c64a857374ebf25a9921", "sha256": "60c1886f9b8935a8d2cb6316356aa0f8caa001e681b09d90438bf27b8fa8cf94" }, "downloads": -1, "filename": "dj-nexmo-0.0.3.tar.gz", "has_sig": false, "md5_digest": "3e1b5d309302c64a857374ebf25a9921", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 23034, "upload_time": "2019-01-17T12:48:12", "url": "https://files.pythonhosted.org/packages/2d/e9/3b7ee8ff06c98eae394b2600e24639c6466985fc6a2b0a4e751e09c777cb/dj-nexmo-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "0b33c035ec63deeb3452f07335124970", "sha256": "fd6170326b27eb507669c7cbf54b62e8c7a9b9adb8b01ee85010e5be221ec6ce" }, "downloads": -1, "filename": "dj_nexmo-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "0b33c035ec63deeb3452f07335124970", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 11438, "upload_time": "2019-01-17T13:27:03", "url": "https://files.pythonhosted.org/packages/8f/e5/529d0da71a65fdaaa2fb9911c3fe48b02b84c97dffc9d2c719dd0d47567c/dj_nexmo-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84445f137695358c21cadc375dcf244e", "sha256": "a8d323bd597b8beaf52ed6e38d37670e38c82bc06a7a5b8a79fe935a79df9861" }, "downloads": -1, "filename": "dj-nexmo-0.0.4.tar.gz", "has_sig": false, "md5_digest": "84445f137695358c21cadc375dcf244e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 23036, "upload_time": "2019-01-17T13:27:04", "url": "https://files.pythonhosted.org/packages/70/31/97433514dd76d4dc13c09d51ebe409e799fbd485e3154cffb64b2d6fc6a2/dj-nexmo-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0b33c035ec63deeb3452f07335124970", "sha256": "fd6170326b27eb507669c7cbf54b62e8c7a9b9adb8b01ee85010e5be221ec6ce" }, "downloads": -1, "filename": "dj_nexmo-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "0b33c035ec63deeb3452f07335124970", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 11438, "upload_time": "2019-01-17T13:27:03", "url": "https://files.pythonhosted.org/packages/8f/e5/529d0da71a65fdaaa2fb9911c3fe48b02b84c97dffc9d2c719dd0d47567c/dj_nexmo-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84445f137695358c21cadc375dcf244e", "sha256": "a8d323bd597b8beaf52ed6e38d37670e38c82bc06a7a5b8a79fe935a79df9861" }, "downloads": -1, "filename": "dj-nexmo-0.0.4.tar.gz", "has_sig": false, "md5_digest": "84445f137695358c21cadc375dcf244e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 23036, "upload_time": "2019-01-17T13:27:04", "url": "https://files.pythonhosted.org/packages/70/31/97433514dd76d4dc13c09d51ebe409e799fbd485e3154cffb64b2d6fc6a2/dj-nexmo-0.0.4.tar.gz" } ] }