{ "info": { "author": "Simon de Haan", "author_email": "simon@praekeltfoundation.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Bellville, A Clickatell Python Library\n======================================\n\nA Python Clickatell HTTP library\n\n::\n\n >>> from clickatell.api import Clickatell\n >>> from clickatell import constants as cc\n >>> clickatell = Clickatell('username','password','api_id', \n ... sendmsg_defaults={\n ... 'callback': cc.YES,\n ... 'msg_type': cc.SMS_DEFAULT,\n ... 'deliv_ack': cc.YES,\n ... 'req_feat': cc.FEAT_ALPHA + \\\n ... cc.FEAT_NUMER + \\\n ... cc.FEAT_DELIVACK\n ... })\n >>> clickatell.sendmsg(recipients=['27123456789'], \\\n ... sender='27123456789', text='hello world')\n [ERR: 301, No Credit Left]\n >>> \n\nNext steps, get some credit for your Clickatell account.\n\n\nGetting started\n===============\n\nMake sure you have an account with Clickatell, they'll give you 10 free SMSs that you can use for testing. However, even undelivered messages count against your credit, make sure you use the library 100% correct if you're planning on actually using the 10. Use the username, password & api_id they provide.\n\nIf you're wanting to use the code then the following should be enough\n\n::\n \n $ python setup.py install\n\nIf you're looking to develop the code do the following:\n\n::\n \n $ virtualenv --no-site-packages ve/\n $ source ve/bin/activate\n (ve)$ pip -E ve/ install -r requirements.pip\n (ve)$ python setup.py develop\n ...\n\nThe Clickatell library from `src/` will be on your PYTHONPATH and accessible via the Python shell.\n\nTesting\n=======\n\nThis project uses Nose for tests, the `master` branch should be stable at all times:\n\n::\n \n (ve)$ pip install nose\n (ve)$ nosetests\n ...\n\n\nUsing Bellville\n===============\n\nSome code examples that illustrate how this thing works.\n\nSending a single SMS\n--------------------\n\n::\n \n >>> from clickatell.api import Clickatell\n >>> clickatell = Clickatell('username','password','api_id')\n >>> [resp] = clickatell.sendmsg(recipients=['27123456789'], \n ... sender='27123456789', \n ... text='hello world')\n >>> resp\n IDResponse: ce7f181a44a4a5b7e43fe2b9a0b1f0c1\n >>> resp.value # Clickatell's apiMsgId value\n 'ce7f181a44a4a5b7e43fe2b9a0b1f0c1'\n >>> \n \nSending an SMS to multiple recipients\n-------------------------------------\n\n::\n \n >>> [resp1, resp2] = clickatell.sendmsg(recipients=[\n ... '27123456781',\n ... '27123456782'], \n ... sender='27123456789',\n ... text='hello world')\n >>> resp1.value # the apiMsgId\n 'ce7f181a44a4a5b7e43fe2b9a0b1f0c1'\n >>> resp1.extra # the extra values returned for the response\n {'To': '27123456781'}\n >>> resp2.value\n 'ce7f181a44a4a5b7e43fe2b9a0b1f0c2'\n >>> resp2.extra\n {'To': '27123456782'}\n >>>\n\nChecking the status of a message\n--------------------------------\n\nClickatell allows you to check the status of messages by polling their servers. However, they also allow you to use HTTP callbacks, where they post the status to your servers in realtime. **This is much faster and more efficient.** \n\n::\n \n >>> status = clickatell.querymsg( \\\n ... apimsgid='ce7f181a44a4a5b7e43fe2b9a0b1f0c1')\n >>> status.value\n 'ce7f181a44a4a5b7e43fe2b9a0b1f0c1'\n >>> status.extra\n {'Status': '002'}\n >>> \n\nChecking the balance of your Clickatell account\n-----------------------------------------------\n\n::\n \n >>> clickatell.getbalance()\n 0.67000000000000004\n >>> \n\n\nChecking the coverage of an MSISDN\n----------------------------------\n\n::\n \n >>> clickatell.check_coverage('27219107700')\n ERRResponse: This prefix is not currently supported. Messages sent to this prefix will fail. Please contact support for assistance.\n >>> resp = clickatell.check_coverage('2776*******')\n >>> resp\n OKResponse: This prefix is currently supported. Messages sent to this prefix will be routed. Charge: 1\n >>> resp.value\n 'This prefix is currently supported. Messages sent to this prefix will be routed.'\n >>> resp.extra\n {'Charge': '1'}\n >>> \n \nChecking the message charge\n---------------------------\n\n::\n \n >>> resp = clickatell.getmsgcharge( \\\n apimsgid='ce7f181a44a4a5b7e43fe2b9a0b1f0c1')\n >>> resp.value\n 'ce7f181a44a4a5b7e43fe2b9a0b1f0c1'\n >>> resp.extra\n {'status': '002', 'charge': '1'}\n >>> \n\n\nSending batches of messages\n---------------------------\n\nThe responses from the `batch.sendmsg()` method are the same as from `clickatell.sendmsg()`.\n\n::\n \n >>> batch = clickatell.batch(sender='27123456789', \n ... template='Hello #field1# #field2#')\n >>> with batch:\n ... batch.sendmsg(to='27123456781', context={\n ... 'field1': 'Foo 1', \n ... 'field2':'Bar 1'\n ... })\n ... batch.sendmsg(to='27123456782', context={\n ... 'field1': 'Foo 2', \n ... 'field2':'Bar 2'\n ... })\n ... \n ERRResponse: 301, No Credit Left\n ERRResponse: 301, No Credit Left\n >>> # shucks\n\nFor the `with` statement to work you'll need Python 2.6 or higher. It can work in Python 2.5 if you manually enable it with: \n \n >>> from __future__ import with_statement\n\nIf you're not wanting to use the context manager you can manually call `batch.start()` and `batch.end()` with the `batch_id` argument.\n\n::\n \n >>> batch = clickatell.batch(sender='27123456789', \n ... template='Hello #field1# #field2#')\n >>> batch_id = batch.start()\n >>> batch.sendmsg(to='...', batch_id=batch_id, context={...})\n >>> batch.sendmsg(to='...', batch_id=batch_id, context={...})\n >>> batch.sendmsg(to='...', batch_id=batch_id, context={...})\n >>> batch.end(batch_id)\n\n\nSending a quick message to multiple recipients:\n-----------------------------------------------\n\n::\n \n >>> with clickatell.batch(sender='27123456789', \n ... template='Hello world!') as batch:\n ... [apimsgid1, apimsgid2, apimsgid3] = batch.quicksend(recipients=[\n ... '27123456781',\n ... '27123456782',\n ... '27123456783',\n ... ])\n ... \n >>> apimsgid1\n ERRResponse: 301, No Credit Left To: 27123456781\n >>> apimsgid2\n ERRResponse: 301, No Credit Left To: 27123456782\n >>> apimsgid3\n ERRResponse: 301, No Credit Left To: 27123456783\n >>> \n\n\nTodo:\n-----\n\nStuff that hasn't been implemented yet is:\n\n 1. deletion of queued messages\n 2. MMS push\n 3. WAP push service indication\n 4. Token voucher payment\n 5. 8bit messaging", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/smn/bellville", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "python-clickatell", "package_url": "https://pypi.org/project/python-clickatell/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-clickatell/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/smn/bellville" }, "release_url": "https://pypi.org/project/python-clickatell/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Clickatell HTTP library", "version": "0.1.3" }, "last_serial": 797880, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "338452bbadbf50bd31bf4c2429255b64", "sha256": "a168e9ddf7e0bb310d01f5880faf6584c20d0c36696d4389894f00281d5ec05d" }, "downloads": -1, "filename": "python_clickatell-0.1-py2.6.egg", "has_sig": false, "md5_digest": "338452bbadbf50bd31bf4c2429255b64", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 26432, "upload_time": "2011-01-19T20:49:10", "url": "https://files.pythonhosted.org/packages/2f/18/f318dcd97e4fef4a609bfc95ea1467262c1dc968341f387a4403823de213/python_clickatell-0.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "e7d58609e165bc8c66b5e51ae454a196", "sha256": "43e85cb59d868d4c21b00c3650638dd6048635cd64000ad9a79df9b4cbb5b70b" }, "downloads": -1, "filename": "python-clickatell-0.1.tar.gz", "has_sig": false, "md5_digest": "e7d58609e165bc8c66b5e51ae454a196", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10861, "upload_time": "2011-01-19T20:49:44", "url": "https://files.pythonhosted.org/packages/ee/7b/72ef2998066e5ba3d87b579549c57e4d811556b704a36571d4e0c72d3653/python-clickatell-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "895716603f57123f8739287e8d86eeb9", "sha256": "d1b661897b4cc30764adec52a15bbf7f282c10a1426e44a9c7228eb1c677087c" }, "downloads": -1, "filename": "python_clickatell-0.1.1-py2.6.egg", "has_sig": false, "md5_digest": "895716603f57123f8739287e8d86eeb9", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 26500, "upload_time": "2011-01-20T07:17:41", "url": "https://files.pythonhosted.org/packages/b1/54/bd66cc45b1d2262e4f8132534de6efff5053f34348300b72a327e21a7dcb/python_clickatell-0.1.1-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "31a9c00d915f1f9b41dda0d32364c819", "sha256": "103b44e72788b1164b606919f6212370c3dea06b64b10d42801585569d882fff" }, "downloads": -1, "filename": "python-clickatell-0.1.1.tar.gz", "has_sig": false, "md5_digest": "31a9c00d915f1f9b41dda0d32364c819", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12796, "upload_time": "2011-01-20T07:17:54", "url": "https://files.pythonhosted.org/packages/17/72/359bb55b7cde7ae9e629094887fc3cf310232fbb2b34b5abe543158d42a9/python-clickatell-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "25903fef1c444947687b6e4d2977397a", "sha256": "986c0d894dab198e17928a84c00c05bca2b44416676d32d53a3e3cc01142601b" }, "downloads": -1, "filename": "python_clickatell-0.1.2-py2.6.egg", "has_sig": false, "md5_digest": "25903fef1c444947687b6e4d2977397a", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 26354, "upload_time": "2011-01-20T07:27:23", "url": "https://files.pythonhosted.org/packages/91/5d/cfd27ae2f6cd3e88c9d093baa848bc5613b8a7ae264f79c83dbc14f51c28/python_clickatell-0.1.2-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "0679db63d85dea14585ca8592dc6a174", "sha256": "8ed240f83b13f3e2c4208e874b8905466395b4f7dd651eff9b729021948eb439" }, "downloads": -1, "filename": "python-clickatell-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0679db63d85dea14585ca8592dc6a174", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12710, "upload_time": "2011-01-20T07:27:37", "url": "https://files.pythonhosted.org/packages/d7/6b/03cb510ff4c2f6256769b29fab276979de036df63f242fbccb019c08ff5f/python-clickatell-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "f91d3978deb4f78f4b8b159a4ccbe79d", "sha256": "46f7d7ca7baf8af0106cc6b3ab4d7b14f29809bb000b5cc6c63a90d0633e73af" }, "downloads": -1, "filename": "python_clickatell-0.1.3-py2.6.egg", "has_sig": false, "md5_digest": "f91d3978deb4f78f4b8b159a4ccbe79d", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 26486, "upload_time": "2011-11-21T11:00:26", "url": "https://files.pythonhosted.org/packages/a6/a6/27e5951c163178464757a0dde335a9c58c8e742d810548d60d4c9136235e/python_clickatell-0.1.3-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "937e7f0f62a12633d5ea92dce0ba483d", "sha256": "b988661757c7427b5df1be15d8b8955ea1f9b7ea07a736661fab5ef7eb2860d4" }, "downloads": -1, "filename": "python-clickatell-0.1.3.tar.gz", "has_sig": false, "md5_digest": "937e7f0f62a12633d5ea92dce0ba483d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12638, "upload_time": "2011-11-21T11:00:13", "url": "https://files.pythonhosted.org/packages/e8/3c/7b0c9fa6652d27682d1c20853d4b5766f5437aa690a7d5c4edcd729ab4a5/python-clickatell-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f91d3978deb4f78f4b8b159a4ccbe79d", "sha256": "46f7d7ca7baf8af0106cc6b3ab4d7b14f29809bb000b5cc6c63a90d0633e73af" }, "downloads": -1, "filename": "python_clickatell-0.1.3-py2.6.egg", "has_sig": false, "md5_digest": "f91d3978deb4f78f4b8b159a4ccbe79d", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 26486, "upload_time": "2011-11-21T11:00:26", "url": "https://files.pythonhosted.org/packages/a6/a6/27e5951c163178464757a0dde335a9c58c8e742d810548d60d4c9136235e/python_clickatell-0.1.3-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "937e7f0f62a12633d5ea92dce0ba483d", "sha256": "b988661757c7427b5df1be15d8b8955ea1f9b7ea07a736661fab5ef7eb2860d4" }, "downloads": -1, "filename": "python-clickatell-0.1.3.tar.gz", "has_sig": false, "md5_digest": "937e7f0f62a12633d5ea92dce0ba483d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12638, "upload_time": "2011-11-21T11:00:13", "url": "https://files.pythonhosted.org/packages/e8/3c/7b0c9fa6652d27682d1c20853d4b5766f5437aa690a7d5c4edcd729ab4a5/python-clickatell-0.1.3.tar.gz" } ] }