{"id":16544588,"url":"https://github.com/devtud/smppy","last_synced_at":"2025-04-11T14:46:02.247Z","repository":{"id":51692740,"uuid":"202608100","full_name":"devtud/smppy","owner":"devtud","description":null,"archived":false,"fork":false,"pushed_at":"2019-09-03T17:31:01.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T10:51:16.041Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devtud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-15T20:36:34.000Z","updated_at":"2024-03-28T19:26:30.000Z","dependencies_parsed_at":"2022-08-22T22:50:37.119Z","dependency_job_id":null,"html_url":"https://github.com/devtud/smppy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtud%2Fsmppy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtud%2Fsmppy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtud%2Fsmppy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devtud%2Fsmppy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devtud","download_url":"https://codeload.github.com/devtud/smppy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248421517,"owners_count":21100627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T19:03:33.898Z","updated_at":"2025-04-11T14:46:02.223Z","avatar_url":"https://github.com/devtud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 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) -\u003e 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevtud%2Fsmppy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevtud%2Fsmppy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevtud%2Fsmppy/lists"}