{ "info": { "author": "David Beitey", "author_email": "david@davidjb.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Telstra Mobile API for Python\n=============================\n\n.. contents::\n\nA potentially vain attempt at creating an API to interact with some of\nTelstra's services for mobile. At present, this library handles:\n\n* Majority of key functionality for USSD via hardware modem\n* Some web-based prepaid account interrogation\n\nOther Telstra services can be added later into the top-level ``telstra.``\nnamespace, potentially by other developers.\n\nQuickstart\n----------\n\nInstall this library with ``pip install telstra.mobile``, make sure\nyou have a supported 3G modem plugged in with a Telstra SIM card\ninstalled. See Install_ section later for full details.\n\nAn example is worth a thousand words, so let's just jump straight into\nit.\n\n.. code:: python\n\n from telstra.mobile import autodetect_account\n account = autodetect_account()\n account = autodetect_account('0412345678')\n\n # Detected via the network\n account.phone_number\n\n # Access a session to #100#\n ussd = account.main_menu()\n\n # So something wacky manually\n ussd = account.modem.sendUssd('#100*2*2#')\n\nThis provides an interface with Telstra's USSD (Unstructured Supplementary\nService Data) services. You may also know this as the ``#100#`` or ``#125#``\nservice.\n\nSo, now, you have an ``account`` that gives you access to common cellular\ncommands that you'd normally be able to manually perform with USSD. A variety\nof operations are automated, such as balance & expiry checking.\n\nThis library allows auto-detection either without a phone number, being\nthe first available physical modem that responds, or with a phone number, and\nthe modem/account must conform to the given number.\n\nIf you're already got a pre-existing `python-gsmmodem`_ modem instance\navailable to you, then you can re-use this by passing it directly during\nmanual initialisation of an account.\n\n.. code:: python\n\n from telstra.mobile import Prepaid\n modem = ... #pre-existing python-gsmmodem instance\n prepaid = Prepaid(modem)\n\nFeatures\n--------\n\nThis library provides a Python-based API that can communicate with these\nservices via a connected cellular modem. So, you can easily auto-detect an\naccount (and modem) based upon the underlying account's phone number. This,\nwhilst helpful, is entirely Telstra specific.\n\nThe initital implementation features an API for working with Telstra Prepaid,\nas this is what I can test against primarily. To a lesser extent, I have\nbeen able to abstract some parts of the code to work with Telstra Postpaid\nas well.\n\nRequirements\n------------\n\n* USB or serial-based cellular modem that works with `python-gsmmodem\n `_. A USB 3G dongle or stick\n like the ZTE 3571-Z works fantastically for all known functionality.\n* Telstra SIM card, prepaid or postpaid\n\nInstall\n-------\n\n#. Obtain materials, insert SIM into modem, connect modem to computer.\n\n#. Ensure you can communicate with your modem via its serial port, for \n example by using Hyperterminal (Windows), or ``screen`` or ``cu`` (Linux).\n This may require driver installation. \n\n#. Install this library. All dependencies will automatically be satisfied::\n\n pip install telstra.mobile\n\n or, if you like `Buildout `_::\n\n [buildout]\n parts = telstra\n\n [telstra]\n receipe = zc.recipe.egg\n eggs = telstra.mobile\n interpreter = py\n\n#. Start using this library. The recommendation is to use the autodetection\n functionality, as this will automatically find the correct serial port\n to connect to. See `Quickstart`_ above.\n\n\nScripts\n-------\n\n* ``bin/send-credit`` - sends credit to a nominated Telstra prepaid phone number by utilising\n the relevant USSD menus and options. This script can automatically run based\n on a number of conditions when called (such as target account balance and\n expiry).\n\n\nUseful links\n------------\n\n* http://pyserial.sourceforge.net/shortintro.html#readline\n\n* http://www.cyberciti.biz/hardware/5-linux-unix-commands-for-connecting-to-the-serial-console/\n\n* https://github.com/smn/txgsm/blob/develop/txgsm/txgsm.py\n\nContributors\n============\n\nContributors\n============\n\nDavid Beitey, Author\n\nChangelog\n=========\n\n0.1 (2015-06-05)\n----------------\n\n- Add option to either responsively or immediately send credit to send\n credit script.\n [davidjb]\n- Improve send credit script with web API calls.\n [davidjb]\n- Add web based prepaid metadata API.\n [davidjb]\n- Fix issue with autodetection probing all modems when the first one works.\n [davidjb]\n- Add ability to initialise modem and account with PIN.\n [davidjb]\n- Add ability for send credit script to detect modem phone number.\n [davidjb]\n- Send credit script does not save data by default (runs unless told otherwise).\n [davidjb]\n- Add call credit balance detection.\n [davidjb]\n- Handle situation when accessing the modem immediately after initialisation.\n [davidjb]\n- Cancel various USSD sessions to prevent later errors.\n [davidjb]\n- Improve handling of credit transfer for insufficient balances.\n [davidjb]\n- Improve amount parsing for prepaid accounts.\n [davidjb]\n- Use improved logging formatting for module.\n [davidjb]\n- Add send credit script to allow scripting of sending credit.\n [davidjb]\n- Package created using templer\n [davidjb]", "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/davidjb/telstra.mobile", "keywords": "Modem Serial pySerial GSM Telstra Cellular Modem", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "telstra.mobile", "package_url": "https://pypi.org/project/telstra.mobile/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/telstra.mobile/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/davidjb/telstra.mobile" }, "release_url": "https://pypi.org/project/telstra.mobile/0.1/", "requires_dist": null, "requires_python": null, "summary": "API for interacting with Telstra's mobile services via cellular modem", "version": "0.1" }, "last_serial": 1579486, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "03955a15aefb59182e1d9ace145d8aa5", "sha256": "6f55a30e2e172b9f41f87dd4c79ed04719f15f4f7928f50aaed4518d59c3db34" }, "downloads": -1, "filename": "telstra.mobile-0.1.tar.gz", "has_sig": false, "md5_digest": "03955a15aefb59182e1d9ace145d8aa5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24110, "upload_time": "2015-06-05T09:22:25", "url": "https://files.pythonhosted.org/packages/0b/f3/0653e62c1a740cf01ed949992441caafa7d7a9a18adaf1f00daafafa8217/telstra.mobile-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "03955a15aefb59182e1d9ace145d8aa5", "sha256": "6f55a30e2e172b9f41f87dd4c79ed04719f15f4f7928f50aaed4518d59c3db34" }, "downloads": -1, "filename": "telstra.mobile-0.1.tar.gz", "has_sig": false, "md5_digest": "03955a15aefb59182e1d9ace145d8aa5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24110, "upload_time": "2015-06-05T09:22:25", "url": "https://files.pythonhosted.org/packages/0b/f3/0653e62c1a740cf01ed949992441caafa7d7a9a18adaf1f00daafafa8217/telstra.mobile-0.1.tar.gz" } ] }