smpp.twisted3


Namesmpp.twisted3 JSON
Version 0.8 PyPI version JSON
download
home_pagehttps://github.com/jookies/smpp.twisted
SummarySMPP 3.4 client built on Twisted / Python3
upload_time2023-11-10 18:39:23
maintainer
docs_urlNone
authorRoger Hoover
requires_python
licenseApache License 2.0
keywords smpp twisted
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # smpp.twisted

[![Test](https://github.com/DomAmato/smpp.twisted/workflows/Python%20Test/badge.svg)](https://github.com/DomAmato/smpp.twisted/actions)
[![Coverage Status](https://coveralls.io/repos/github/DomAmato/smpp.twisted/badge.svg?branch=master)](https://coveralls.io/github/DomAmato/smpp.twisted?branch=master)

SMPP 3.4 client built on Twisted

http://www.nowsms.com/discus/messages/1/24856.html

Example
-------
    import logging
    from twisted.internet import reactor, defer
    from smpp.twisted.client import SMPPClientTransceiver, SMPPClientService
    from smpp.twisted.config import SMPPClientConfig

    class SMPP:

        def __init__(self, config=None):
            if config is None:
                config = SMPPClientConfig(host='localhost', port=999, username='uname', password='pwd')
            self.config = config
        
        @defer.inlineCallbacks
        def run(self):
            try:
                #Bind
                smpp = yield SMPPClientTransceiver(self.config, self.handleMsg).connectAndBind()
                #Wait for disconnect
                yield smpp.getDisconnectedDeferred()
            except Exception, e:
                print "ERROR: %s" % str(e)
            finally:
                reactor.stop()
    
        def handleMsg(self, smpp, pdu):
            """
            NOTE: you can return a Deferred here
            """
            print "Received pdu %s" % pdu
    
    if __name__ == '__main__':
        logging.basicConfig(level=logging.DEBUG)
        SMPP().run()
        reactor.run()
        
Credits
=======
* Thanks to [rtrdev](https://github.com/rtrdev) for adding support for SMPP servers
* Thanks to [Fourat Zouari](https://github.com/fourat) for finding and fixing an enquirelinks bug

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jookies/smpp.twisted",
    "name": "smpp.twisted3",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "smpp twisted",
    "author": "Roger Hoover",
    "author_email": "roger.hoover@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/f3/2b/9f822d9ae39e7ee0326216d2dc94424c526013ab50127c27aefd5f33d367/smpp.twisted3-0.8.tar.gz",
    "platform": null,
    "description": "# smpp.twisted\n\n[![Test](https://github.com/DomAmato/smpp.twisted/workflows/Python%20Test/badge.svg)](https://github.com/DomAmato/smpp.twisted/actions)\n[![Coverage Status](https://coveralls.io/repos/github/DomAmato/smpp.twisted/badge.svg?branch=master)](https://coveralls.io/github/DomAmato/smpp.twisted?branch=master)\n\nSMPP 3.4 client built on Twisted\n\nhttp://www.nowsms.com/discus/messages/1/24856.html\n\nExample\n-------\n    import logging\n    from twisted.internet import reactor, defer\n    from smpp.twisted.client import SMPPClientTransceiver, SMPPClientService\n    from smpp.twisted.config import SMPPClientConfig\n\n    class SMPP:\n\n        def __init__(self, config=None):\n            if config is None:\n                config = SMPPClientConfig(host='localhost', port=999, username='uname', password='pwd')\n            self.config = config\n        \n        @defer.inlineCallbacks\n        def run(self):\n            try:\n                #Bind\n                smpp = yield SMPPClientTransceiver(self.config, self.handleMsg).connectAndBind()\n                #Wait for disconnect\n                yield smpp.getDisconnectedDeferred()\n            except Exception, e:\n                print \"ERROR: %s\" % str(e)\n            finally:\n                reactor.stop()\n    \n        def handleMsg(self, smpp, pdu):\n            \"\"\"\n            NOTE: you can return a Deferred here\n            \"\"\"\n            print \"Received pdu %s\" % pdu\n    \n    if __name__ == '__main__':\n        logging.basicConfig(level=logging.DEBUG)\n        SMPP().run()\n        reactor.run()\n        \nCredits\n=======\n* Thanks to [rtrdev](https://github.com/rtrdev) for adding support for SMPP servers\n* Thanks to [Fourat Zouari](https://github.com/fourat) for finding and fixing an enquirelinks bug\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "SMPP 3.4 client built on Twisted / Python3",
    "version": "0.8",
    "project_urls": {
        "Homepage": "https://github.com/jookies/smpp.twisted"
    },
    "split_keywords": [
        "smpp",
        "twisted"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f32b9f822d9ae39e7ee0326216d2dc94424c526013ab50127c27aefd5f33d367",
                "md5": "63afdeb6e5d41150966c6496b848671b",
                "sha256": "f172f1c37ea3653db2fed258990b27f94c2f4f8897715aef5c2e04c9cb1bec56"
            },
            "downloads": -1,
            "filename": "smpp.twisted3-0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "63afdeb6e5d41150966c6496b848671b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22648,
            "upload_time": "2023-11-10T18:39:23",
            "upload_time_iso_8601": "2023-11-10T18:39:23.365118Z",
            "url": "https://files.pythonhosted.org/packages/f3/2b/9f822d9ae39e7ee0326216d2dc94424c526013ab50127c27aefd5f33d367/smpp.twisted3-0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-10 18:39:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jookies",
    "github_project": "smpp.twisted",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "smpp.twisted3"
}
        
Elapsed time: 0.14595s