{ "info": { "author": "Richard Jones", "author_email": "rjones@ekit-inc.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "SMS PDU encoding and decoding, including GSM-0338 character set.\n\nOverview\n--------\n\nThis library handles SMS-DELIVER and SMS-SUBMIT format PDUs, and includes\nfull support for all data formats, flags and headers, and round-trips from\nPDU to object and back again.\n\nIt also includes convenience APIs for constructing new PDUs from text or\ndata.\n\nThis library is very mature - it's been in production use for many years\nbefore the 1.0 release was made. It's also, as far as I'm aware, the most\ncomplete SMS PDU encoding and decoding library available.\n\nThe T39 functionality has been copied from the previous PyPI package with\nthe same name as this library to provide some continuity. It is untested.\n\n\nPDU Interface\n-------------\n\nTypical usage will involve the SMS_SUBMIT and SMS_DELIVER .fromPDU(),\n.toPDU() and .create() methods:\n\n>>> from smspdu import SMS_SUBMIT\n>>> pdu = SMS_SUBMIT.create('sender', 'recipient', 'hello, world')\n>>> pdu.toPDU()\n'010010D0F2F2380D4F97DD7400000CE8329BFD6681EE6F399B0C'\n>>> pdu = smspdu.SMS_SUBMIT.fromPDU(_, 'sender')\n>>> pdu.user_data\nu'hello, world'\n\n\nCommand-line Usage\n------------------\n\nTo decode a PDU on the command-line (using python2.7+), use::\n\n % python -m smspdu 010010D0F2F2380D4F97DD7400000CE8329BFD6681EE6F399B0C\n\n 010010D0F2F2380D4F97DD7400000CE8329BFD6681EE6F399B0C\n tp_mti = 1 (SMS-SUBMIT)\n sender = unknown\n tp_rd = 0\n tp_vpf = 0\n tp_vp = None\n tp_rp = 0\n tp_udhi = 0\n tp_srr = 0\n tp_mr = 0\n tp_al = 16\n tp_toa = d0 (Alphanumeric; Unknown)\n (recipient) address = 'recipient'\n tp_pid = 0x00 (Normal Case)\n tp_dcs = 0x00 (Immedate Display, GSM-0338 Default Alphabet)\n tp_udl = 12\n tp_ud = '\\xe82\\x9b\\xfdf\\x81\\xeeo9\\x9b\\x0c'\n datestamp = 11062712173200\n user_data = u'hello, world'\n user_data_headers = []\n\nThe first line re-displays the PDU with the various sections colourised.\n\nUsers of versions of Python 2.6 will need to run \"python -m smspdu.pdu\".\n\n\nSMS Text - Handling the Awesomeness of GSM 0338\n-----------------------------------------------\n\nFirst the basics; encoding some text:\n\n>>> from smspdu import gsm0338\n>>> c = gsm0338()\n>>> gsm_message = c.encode(u'test message')\n\nAnd decoding that message:\n\n>>> from smspdu import gsm0338\n>>> c = gsm0338()\n>>> c.decode(gsm_message)\nu'test message'\n\nThe library also provides some functions for making text SMS-happy:\n\n**gsm0338_safe**\n A simplistic function which just replaces any characters in the unicode\n input. You should probably use **attempt_encoding** instead since it\n tries to make the message appear the same.\n**attempt_encoding**\n Attempt to encode the supplied text for SMS transmission in a single\n message. This will alter the message to replace accents and typography\n where necessary to reduce the per-character septet count.\n**remove_accent**\n Used by **attempt_encoding** to remove all accents from characters in\n the supplied text.\n**remove_typography**\n Used by **attempt_encoding** to replaced typograpically-correct\n punctuation with simplified GSM-0338 characters.\n**decode_ascii_safe**\n Removes all non-printable, non-ASCII codes in the string.\n**smpp_to_sms_data_coding**\n Attempt to convert the SMPP data coding scheme (SMPP v34) to a useful\n SMS PDU (GSM 03.38) data coding scheme.\n\nVersion History (in Brief)\n--------------------------\n\n- 1.0 the initial release based on mature internal ekit.com code\n\n----\n\nThis code is copyright 2011 eKit.com Inc (http://www.ekit.com/)\nSee the end of the source file for the license of use.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/smspdu", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "smspdu", "package_url": "https://pypi.org/project/smspdu/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/smspdu/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/smspdu" }, "release_url": "https://pypi.org/project/smspdu/1.0/", "requires_dist": null, "requires_python": null, "summary": "SMS PDU encoding and decoding, including GSM-0338 character set", "version": "1.0" }, "last_serial": 799750, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "87ee26cf57a12c8ca5c21e8543708a7b", "sha256": "1cfe9229cb9f36a6d1393b4acb2489ed7f62926d9f586cd3eaefed055fab732b" }, "downloads": -1, "filename": "smspdu-0.2-py2.5.egg", "has_sig": false, "md5_digest": "87ee26cf57a12c8ca5c21e8543708a7b", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 4628, "upload_time": "2009-07-23T19:05:18", "url": "https://files.pythonhosted.org/packages/7a/32/9a75ecef2ba97ffb07990e5a4039903a9c955677bb247ca050c087a9be34/smspdu-0.2-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "84b6457a6cf134eab1a2cf7c29eef274", "sha256": "4fb249378cdd904171b2625791cc4e90ecca813790ba583b88b3473428c34ce0" }, "downloads": -1, "filename": "smspdu-0.2.tar.gz", "has_sig": false, "md5_digest": "84b6457a6cf134eab1a2cf7c29eef274", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2453, "upload_time": "2009-07-23T19:05:17", "url": "https://files.pythonhosted.org/packages/ff/82/09cacd7fc41d72c87e13e7e81d5767d5486be827ae0f30c37f2e15c111f8/smspdu-0.2.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "d350d9923c9a943c8e8af6825a41f529", "sha256": "22467948c5c429c76449855d49616f751c7ee5a71fb017f3b9e0537f820791f9" }, "downloads": -1, "filename": "smspdu-1.0.tar.gz", "has_sig": false, "md5_digest": "d350d9923c9a943c8e8af6825a41f529", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28226, "upload_time": "2011-06-27T04:56:44", "url": "https://files.pythonhosted.org/packages/d4/ef/f632a98655bfe6ada9eca406c4980fe1ca23f925efd93ab33cd57cd16994/smspdu-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d350d9923c9a943c8e8af6825a41f529", "sha256": "22467948c5c429c76449855d49616f751c7ee5a71fb017f3b9e0537f820791f9" }, "downloads": -1, "filename": "smspdu-1.0.tar.gz", "has_sig": false, "md5_digest": "d350d9923c9a943c8e8af6825a41f529", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28226, "upload_time": "2011-06-27T04:56:44", "url": "https://files.pythonhosted.org/packages/d4/ef/f632a98655bfe6ada9eca406c4980fe1ca23f925efd93ab33cd57cd16994/smspdu-1.0.tar.gz" } ] }