{ "info": { "author": "Isaac Dadzie", "author_email": "idadzie.dev@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# pyhubtel-sms\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) [![license](https://img.shields.io/badge/license-apache%202.0-brightgreen.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\n\n\nThis package provides a convenient and easy way to use / integrate [Hubtel](https://hubtel.com)'s SMS APIs in your python project.\n\n**NOTE:** This project is a beta release and as such might be subject to minor changes in the future. \n\n\n\n## Installation\n\nInstall and update using [pip](https://pip.pypa.io/en/stable/quickstart/).\n\n```sh\npip install -U pyhubtel-sms\n\ud83c\udf89\n```\n\n\n\n## A Simple Example\n\n```python\n>>> # send an SMS to a single recipient\n>>> from pyhubtel_sms import SMS\n>>> sms = SMS(client_id='iwwofuxx', client_secret='icctaeik')\n>>> sms.send_message(sender='PyHubtel', recipient='0502345678', content='Hello world', registered_delivery=True)\n{'MessageId': 'f2665231-522f-32b6-accf-6ac8426bfd5c', 'Rate': 1, 'NetworkId': '62002', 'Status': 0}\n```\n\n\n\n## Usage\n\nBelow are usage examples for the implemented [send message][1] and [batch sms][2] APIs.\n\n#### Send a message to a single recipient\n\n```python\n>>> from pyhubtel_sms import SMS, Message\n>>> sms = SMS(client_id='iwwofuxx', client_secret='icctaeik')\n>>> message = Message(\n... sender='PyHubtel',\n... content='Apples',\n... recipient='0502345678',\n... registered_delivery=True,\n... )\n>>> sms.send(message)\n{'Status': 0, 'NetworkId': '62002', 'MessageId': '3f20fe72-e0fd-437b-b63d-dbf2b0af9c8b', 'Rate': 1}\n```\n\n\n\n#### Send the same message to different recipients\n\n```python\n>>> from pyhubtel_sms import SMS, Message\n>>> sms = SMS(client_id='iwwofuxx', client_secret='icctaeik')\n>>> bulk_message_one = Message(\n... sender='PyHubtel',\n... content='Oranges',\n... recipients=['0202345678', '0502345678'],\n... campaign_name='PyHubtel SMS Campaign',\n... )\n>>> sms.send(bulk_message_one)\n{'Status': 'Scheduled', 'Name': 'PyHubtel SMS Campaign', 'SenderId': 'PyHubtel', 'TotalCount': 2, 'Time': '2018-04-06 04:16', 'Id': 664544, 'Stats': {'Pending': 2}}\n```\n\n\n\n#### Send personalized messages to recipients\n\n```python\n>>> from pyhubtel_sms import SMS, Message, Messages\n>>> sms = SMS(client_id='iwwofuxx', client_secret='icctaeik')\n>>> message_one = Message(\n... content='Apple Pie',\n... recipient='0202345678',\n... )\n>>> message_two = Message(\n... content='Orange Tart',\n... recipient='0572345678',\n... )\n>>> bulk_message_two = Messages(\n... sender='PyHubtel',\n... campaign_name='PyHubtel SMS Campaign',\n... batch=[message_one, message_two],\n... time='12:46 pm'\n... )\n>>> sms.send(bulk_message_two)\n{'Stats': {'Pending': 2}, 'Status': 'Scheduled', 'Time': '2018-04-07 12:46', 'SenderId': 'PyHubtel', 'TotalCount': 2, 'Name': 'PyHubtel SMS Campaign','Id': 664817}\n```\n\n\n\n## Contributing\n\nAll contributions are welcome - from typo fixes to complete refactors and new features. If you happen to encounter a bug or would like to suggest an improvement, please feel free to open an issue or submit a pull request.\n\n\n\n## License\n\nThis project is released under the [Apache License, Version 2.0].\n\n[1]: https://developers.hubtel.com/documentations/sendmessage\n[2]: https://developers.hubtel.com/documentations/batch-sms-api\n[Apache License, Version 2.0]: http://www.apache.org/licenses/LICENSE-2.0", "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/idadzie/pyhubtel-sms", "keywords": "hubtel sms development", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "pyhubtel-sms", "package_url": "https://pypi.org/project/pyhubtel-sms/", "platform": "", "project_url": "https://pypi.org/project/pyhubtel-sms/", "project_urls": { "Homepage": "https://github.com/idadzie/pyhubtel-sms" }, "release_url": "https://pypi.org/project/pyhubtel-sms/0.0.1/", "requires_dist": null, "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "An easy to use wrapper for Hubtel's SMS APIs.", "version": "0.0.1" }, "last_serial": 3810910, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "7f049bcc05be92a01dc44719436ca0f6", "sha256": "5e7743539e013bc9c065803cdda5b8ea44f163905162d43dd99218d491f291fa" }, "downloads": -1, "filename": "pyhubtel_sms-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7f049bcc05be92a01dc44719436ca0f6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 11103, "upload_time": "2018-04-26T16:19:04", "url": "https://files.pythonhosted.org/packages/3b/0e/0a4ffe8a7f2b92586983d540d2bfbd505529876d1388782bdfce10f425d6/pyhubtel_sms-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec30b9dec001d72203d8356c70b7fe99", "sha256": "e7ef2a2048b6a7c7a686509ebf74e575ce5eeb116a82c6858af2d53071a90237" }, "downloads": -1, "filename": "pyhubtel-sms-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ec30b9dec001d72203d8356c70b7fe99", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9793, "upload_time": "2018-04-26T16:19:01", "url": "https://files.pythonhosted.org/packages/d6/fe/5c8f6f0691cff693749321ba72cfe086d12f5575e2296620479351eae4a8/pyhubtel-sms-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7f049bcc05be92a01dc44719436ca0f6", "sha256": "5e7743539e013bc9c065803cdda5b8ea44f163905162d43dd99218d491f291fa" }, "downloads": -1, "filename": "pyhubtel_sms-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7f049bcc05be92a01dc44719436ca0f6", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 11103, "upload_time": "2018-04-26T16:19:04", "url": "https://files.pythonhosted.org/packages/3b/0e/0a4ffe8a7f2b92586983d540d2bfbd505529876d1388782bdfce10f425d6/pyhubtel_sms-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec30b9dec001d72203d8356c70b7fe99", "sha256": "e7ef2a2048b6a7c7a686509ebf74e575ce5eeb116a82c6858af2d53071a90237" }, "downloads": -1, "filename": "pyhubtel-sms-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ec30b9dec001d72203d8356c70b7fe99", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9793, "upload_time": "2018-04-26T16:19:01", "url": "https://files.pythonhosted.org/packages/d6/fe/5c8f6f0691cff693749321ba72cfe086d12f5575e2296620479351eae4a8/pyhubtel-sms-0.0.1.tar.gz" } ] }