{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "# SMPPY\n## Simple tool for building SMPP servers\n\n---\n\n## How to install\n\n```bash\npip install smppy\n```\n\n## How to build a SMPP server app with `smppy`\n\nCreating a SMPP server app with `smppy` is simple as inheriting from\n`smppy.Application` and implementing a few methods. Below is the example\napp you can find in [scripts/example_server](scripts/example_server.py) file.\n\n```python\nfrom smppy import Application, SmppClient\nfrom typing import List, Union\n\n\nclass MySmppApp(Application):\n def __init__(self, name: str, logger):\n self.clients: List[SmppClient] = []\n super(MySmppApp, self).__init__(name=name, logger=logger)\n\n async def handle_bound_client(self, client: SmppClient) -> Union[SmppClient, None]:\n self.clients.append(client)\n self.logger.debug(f'Client {client.system_id} connected.')\n return client\n\n async def handle_unbound_client(self, client: SmppClient):\n self.clients.remove(client)\n\n async def handle_sms_received(self, client: SmppClient, source_number: str,\n dest_number: str, text: str):\n self.logger.debug(f'Received {text} from {source_number}')\n await client.send_sms(source=dest_number, dest=source_number,\n text=f'You have sent {text} to me...')\n```\n\n## Run\n\n### 1. Run the server app\n\nSource code: [example_server.py](scripts/example_server.py)\n\nIn a terminal tab run:\n\n python -m scripts.example_server\n\n### 2. Run the test client\n\n**smppy** has also a SMPP client which can be manipulated through a command\nline:\n\nSource code: [test_client.py](scripts/test_client.py):\n\nIn a second terminal tab run:\n\n python -m scripts.test_client\n\nA SMPP client connects to the server and a Python shell opens.\n\nAvailable functions:\n- `send_message(message: str, sender: str, receiver: str)`\n\n### 3. Watch logs\n\nIn a third terminal tab run:\n\n tail -f client.log\n\nto view all client events.\n\n## Contributing\n\nFeel free to open issues and pull requests.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "smpp server", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "smppy", "package_url": "https://pypi.org/project/smppy/", "platform": "", "project_url": "https://pypi.org/project/smppy/", "project_urls": { "Source": "https://github.com" }, "release_url": "https://pypi.org/project/smppy/0.3.2/", "requires_dist": null, "requires_python": ">=3.7, <4", "summary": "Build SMPP server apps in Python3", "version": "0.3.2" }, "last_serial": 5777198, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a98dfc1189ae10c61a20bc774d773eaf", "sha256": "fefea06678e4b307db45d34303be8fb68d28b2cff61b25fb024bfbd85ded16a7" }, "downloads": -1, "filename": "smppy-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a98dfc1189ae10c61a20bc774d773eaf", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 4154, "upload_time": "2019-08-20T12:37:57", "url": "https://files.pythonhosted.org/packages/a2/b5/1cf292e1c6f538816fd6d0c55b44b0a7bc49acb82b4b8fcedc80ab913029/smppy-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "31c646ef740ed384a1cc35a206f3dac2", "sha256": "7f88311a1eb1a7a7425abb7694f657ee0f806b008ce278cafa39934f3e3ae1de" }, "downloads": -1, "filename": "smppy-0.2.0.tar.gz", "has_sig": false, "md5_digest": "31c646ef740ed384a1cc35a206f3dac2", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 5273, "upload_time": "2019-08-23T11:34:29", "url": "https://files.pythonhosted.org/packages/ad/bc/1947e9e141dab84cbcc2bd8932d57718f3b71047a689b04aabc0c3478137/smppy-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "9e730135aa568204f966a20eeecf2a9e", "sha256": "4141862a4b4045fbe36b7a67d0883e8caeee3a29420f3c2415c82b1d7abb6ec5" }, "downloads": -1, "filename": "smppy-0.3.0.tar.gz", "has_sig": false, "md5_digest": "9e730135aa568204f966a20eeecf2a9e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 5152, "upload_time": "2019-08-28T07:30:19", "url": "https://files.pythonhosted.org/packages/b6/ae/91a700386db87a88a538dbfc94b372bb5895af605dee8761663d7cebb351/smppy-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "41d1296af8cd0a7b42a4e00ebf74db1b", "sha256": "d60382e25489a9e01d753825233c85f15f3aef59ff25ac0545064057fb68fa4f" }, "downloads": -1, "filename": "smppy-0.3.1.tar.gz", "has_sig": false, "md5_digest": "41d1296af8cd0a7b42a4e00ebf74db1b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 5971, "upload_time": "2019-09-03T15:47:58", "url": "https://files.pythonhosted.org/packages/49/03/6255623c4832d07e7667eeea5d5fa6a65928ecad31673fd13fd36f18d6d0/smppy-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "33fa3736a0ff63f29168f3ca1bd095ad", "sha256": "da98d4d9fa8f4ea6ba19dd6689951b100b51c1b183210bb02e3c2242296e57b3" }, "downloads": -1, "filename": "smppy-0.3.2.tar.gz", "has_sig": false, "md5_digest": "33fa3736a0ff63f29168f3ca1bd095ad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 5969, "upload_time": "2019-09-03T17:31:38", "url": "https://files.pythonhosted.org/packages/55/cb/7cec3950f92481b68682a7b2890a39aad83c214b04827e7d7e6bb523c945/smppy-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "33fa3736a0ff63f29168f3ca1bd095ad", "sha256": "da98d4d9fa8f4ea6ba19dd6689951b100b51c1b183210bb02e3c2242296e57b3" }, "downloads": -1, "filename": "smppy-0.3.2.tar.gz", "has_sig": false, "md5_digest": "33fa3736a0ff63f29168f3ca1bd095ad", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 5969, "upload_time": "2019-09-03T17:31:38", "url": "https://files.pythonhosted.org/packages/55/cb/7cec3950f92481b68682a7b2890a39aad83c214b04827e7d7e6bb523c945/smppy-0.3.2.tar.gz" } ] }