{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Telecommunications Industry", "License :: OSI Approved", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Communications", "Topic :: Communications :: Telephony", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "`python-smpplib`\n================\n\n[![Version](https://img.shields.io/pypi/v/smpplib.svg?style=flat)](https://pypi.org/project/smpplib/#history)\n[![Python versions](https://img.shields.io/pypi/pyversions/smpplib.svg?style=flat)](https://pypi.org/project/smpplib/)\n[![PyPI downloads](https://img.shields.io/pypi/dm/smpplib.svg?style=flat)](https://pypi.org/project/smpplib/#files)\n![License](https://img.shields.io/pypi/l/smpplib.svg?style=flat)\n[![CircleCI](https://circleci.com/gh/python-smpplib/python-smpplib.svg?style=svg)](https://circleci.com/gh/python-smpplib/python-smpplib)\n\nSMPP library for Python. Forked from [Google Code](https://code.google.com/p/smpplib/).\n\nExample:\n\n```python\nimport logging\nimport sys\n\nimport smpplib.gsm\nimport smpplib.client\nimport smpplib.consts\n\n# if you want to know what's happening\nlogging.basicConfig(level='DEBUG')\n\n# Two parts, UCS2, SMS with UDH\nparts, encoding_flag, msg_type_flag = smpplib.gsm.make_parts(u'\u041f\u0440\u0438\u0432\u0435\u0442 \u043c\u0438\u0440!\\n'*10)\n\nclient = smpplib.client.Client('example.com', SOMEPORTNUMBER)\n\n# Print when obtain message_id\nclient.set_message_sent_handler(\n lambda pdu: sys.stdout.write('sent {} {}\\n'.format(pdu.sequence, pdu.message_id)))\nclient.set_message_received_handler(\n lambda pdu: sys.stdout.write('delivered {}\\n'.format(pdu.receipted_message_id)))\n\nclient.connect()\nclient.bind_transceiver(system_id='login', password='secret')\n\nfor part in parts:\n pdu = client.send_message(\n source_addr_ton=smpplib.consts.SMPP_TON_INTL,\n #source_addr_npi=smpplib.consts.SMPP_NPI_ISDN,\n # Make sure it is a byte string, not unicode:\n source_addr='SENDERPHONENUM',\n\n dest_addr_ton=smpplib.consts.SMPP_TON_INTL,\n #dest_addr_npi=smpplib.consts.SMPP_NPI_ISDN,\n # Make sure thease two params are byte strings, not unicode:\n destination_addr='PHONENUMBER',\n short_message=part,\n\n data_coding=encoding_flag,\n esm_class=msg_type_flag,\n registered_delivery=True,\n )\n print(pdu.sequence)\nclient.listen()\n```\nYou also may want to listen in a thread:\n```python\nfrom threading import Thread\nt = Thread(target=client.listen)\nt.start()\n```\n\nThe client supports setting a custom generator that produces sequence numbers for the PDU packages. Per default a simple in memory generator is used which in conclusion is reset on (re)instantiation of the client, e.g. by an application restart. If you want to keep the sequence number to be persisted across restarts you can implement your own storage backed generator.\n\nExample:\n\n```python\nimport smpplib.client\n\nimport mymodule\n\ngenerator = mymodule.PersistentSequenceGenerator()\nclient = smpplib.client.Client('example.com', SOMEPORTNUMBER, sequence_generator=generator)\n...\n```\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/podshumok/python-smpplib", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "smpplib", "package_url": "https://pypi.org/project/smpplib/", "platform": "", "project_url": "https://pypi.org/project/smpplib/", "project_urls": { "Homepage": "https://github.com/podshumok/python-smpplib" }, "release_url": "https://pypi.org/project/smpplib/2.0.1/", "requires_dist": [ "six" ], "requires_python": "", "summary": "SMPP library for python", "version": "2.0.1" }, "last_serial": 5332412, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "92943ee167541fef7e70b4b298d743a7", "sha256": "ee72182e25812e888dc5b58d906f294eb28d54fa89f0697f2dd2face2167a1d1" }, "downloads": -1, "filename": "smpplib-0.1.tar.gz", "has_sig": false, "md5_digest": "92943ee167541fef7e70b4b298d743a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13321, "upload_time": "2010-12-09T14:17:57", "url": "https://files.pythonhosted.org/packages/76/7c/f05fc2160f2752efa238c199a5bb17a17b01fccdf2cca0390063f5abae3d/smpplib-0.1.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "55d0c675c74755dab61eb257fc98996b", "sha256": "5bc3611201e2aa1ef701d7ea7e081fd33cb0ce398a2b4fa59fc7822ded594438" }, "downloads": -1, "filename": "smpplib-2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "55d0c675c74755dab61eb257fc98996b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23853, "upload_time": "2019-02-06T13:15:12", "url": "https://files.pythonhosted.org/packages/a9/49/81f8c8fb0ed761270e7003b1be98eb1518af1ee857d86a5e7f1a7e00ca0e/smpplib-2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "917b43b7b063462cc71474fa076e5ca8", "sha256": "96605460f14a503579aecc7f182431537b9708c36a3c0838c499d8904dc3fe95" }, "downloads": -1, "filename": "smpplib-2.0.tar.gz", "has_sig": false, "md5_digest": "917b43b7b063462cc71474fa076e5ca8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19395, "upload_time": "2019-02-06T13:15:13", "url": "https://files.pythonhosted.org/packages/89/d9/c0d71a39b0387134df90442b4374d17688f351976e3a28d95d9f90eaa5c7/smpplib-2.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "0aabac37fb3da6f78f39e484be37dd1c", "sha256": "4002f02e908d4b6de7893fd005683f60f6c5ec13bf9d73d3bca70ffab45fc037" }, "downloads": -1, "filename": "smpplib-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0aabac37fb3da6f78f39e484be37dd1c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23974, "upload_time": "2019-05-29T13:43:59", "url": "https://files.pythonhosted.org/packages/3f/da/377a478707c243ee070989dab01ebfd2d8d2a5dd6a1d8007527832c41861/smpplib-2.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3f2128c7c4d6ebc7a9fd0f8f79fba954", "sha256": "fa8c191dea03dca6247a94f92cc2032c54819a2804f5897ddf6741c82711de1d" }, "downloads": -1, "filename": "smpplib-2.0.1.tar.gz", "has_sig": false, "md5_digest": "3f2128c7c4d6ebc7a9fd0f8f79fba954", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19623, "upload_time": "2019-05-29T13:44:01", "url": "https://files.pythonhosted.org/packages/07/1b/eaa2a41df512de45625ad8fe024016255650993cedc360ba46ccac170080/smpplib-2.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0aabac37fb3da6f78f39e484be37dd1c", "sha256": "4002f02e908d4b6de7893fd005683f60f6c5ec13bf9d73d3bca70ffab45fc037" }, "downloads": -1, "filename": "smpplib-2.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0aabac37fb3da6f78f39e484be37dd1c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 23974, "upload_time": "2019-05-29T13:43:59", "url": "https://files.pythonhosted.org/packages/3f/da/377a478707c243ee070989dab01ebfd2d8d2a5dd6a1d8007527832c41861/smpplib-2.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3f2128c7c4d6ebc7a9fd0f8f79fba954", "sha256": "fa8c191dea03dca6247a94f92cc2032c54819a2804f5897ddf6741c82711de1d" }, "downloads": -1, "filename": "smpplib-2.0.1.tar.gz", "has_sig": false, "md5_digest": "3f2128c7c4d6ebc7a9fd0f8f79fba954", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19623, "upload_time": "2019-05-29T13:44:01", "url": "https://files.pythonhosted.org/packages/07/1b/eaa2a41df512de45625ad8fe024016255650993cedc360ba46ccac170080/smpplib-2.0.1.tar.gz" } ] }