Metadata-Version: 2.1
Name: naz
Version: 0.0.0.2
Summary: Naz is an SMPP client.
Home-page: https://github.com/komuw/naz
Author: komuW
Author-email: komuw05@gmail.com
License: MIT
Description: naz
        ---
        
        `Codacy
        Badge <https://www.codacy.com/app/komuw/naz?utm_source=github.com&utm_medium=referral&utm_content=komuw/naz&utm_campaign=Badge_Grade>`__
        `Build Status <https://travis-ci.com/komuw/naz>`__
        `codecov <https://codecov.io/gh/komuw/naz>`__
        
        | naz is an SMPP client.
        | It’s name is derived from Kenyan hip hop artiste, Nazizi.
        
           SMPP is a protocol designed for the transfer of short message data
           between External Short Messaging Entities(ESMEs), Routing
           Entities(REs) and Short Message Service Center(SMSC). -
           `Wikipedia <https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer>`__
        
        naz currently only supports SMPP version 3.4.
        
        | naz is in active development and it’s API may change in backward
          incompatible ways.
        | https://pypi.python.org/pypi/naz
        
        Installation
        ------------
        
        .. code:: shell
        
           pip install naz
        
        Usage
        -----
        
        1. As a library
        ^^^^^^^^^^^^^^^
        
        .. code:: python
        
           import asyncio
           import naz
        
        
           loop = asyncio.get_event_loop()
           cli = naz.Client(
               async_loop=loop,
               smsc_host="127.0.0.1",
               smsc_port=2775,
               system_id="smppclient1",
               password="password",
           )
        
           # queue messages to send
           for i in range(0, 4):
               print("submit_sm round:", i)
               loop.run_until_complete(
                   cli.submit_sm(
                       msg="Hello World-{0}".format(str(i)),
                       correlation_id="myid12345",
                       source_addr="254722111111",
                       destination_addr="254722999999",
                   )
               )
        
           # connect to the SMSC host
           reader, writer = loop.run_until_complete(cli.connect())
           # bind to SMSC as a tranceiver
           loop.run_until_complete(cli.tranceiver_bind())
        
           # read any data from SMSC, send any queued messages to SMSC and continually check the state of the SMSC
           gathering = asyncio.gather(cli.send_forever(), cli.receive_data(), cli.enquire_link())
           loop.run_until_complete(gathering)
        
           loop.run_forever()
           loop.close()
        
        2. As a cli app
        ^^^^^^^^^^^^^^^
        
        | naz also ships with a commandline interface app called ``naz-cli``.
        | create a json config file, eg;
        | ``/tmp/my_config.json``
        
        ::
        
           {
             "smsc_host": "127.0.0.1",
             "smsc_port": 2775,
             "system_id": "smppclient1",
             "password": "password"
           }
        
        | then run:
        | ``naz-cli --config /tmp/my_config.json``
        
        .. code:: shell
        
                Naz: the SMPP client.
        
           submit_sm_enqueue. correlation_id=myid12345. source_addr=254722111111. destination_addr=254722999999. log_metadata={'smsc_host': '127.0.0.1', 'system_id': 'smppclient1'}
           submit_sm_enqueued. event=submit_sm. correlation_id=myid12345. source_addr=254722111111. destination_addr=254722999999. log_metadata={'smsc_host': '127.0.0.1', 'system_id': 'smppclient1'}
           network_connecting. log_metadata={'smsc_host': '127.0.0.1', 'system_id': 'smppclient1'}
           network_connected. log_metadata={'smsc_host': '127.0.0.1', 'system_id': 'smppclient1'}
        
        To see help:
        
        ``naz-cli --help``
        
        .. code:: shell
        
           usage: naz [-h] [--version] [--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
                      --config CONFIG
        
           naz is an SMPP client. example usage: naz-cli --config /path/to/my_config.json
        
           optional arguments:
             -h, --help            show this help message and exit
             --version             The currently installed naz version.
             --loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}
                                   The log level to output log messages at. eg:
                                   --loglevel DEBUG
             --config CONFIG       The config file to use. eg: --config
                                   /path/to/my_config.json
        
        ## Features
        -----------
        
        -  
        -  Well written(if I have to say so myself):
        
           -  `Good test coverage <https://codecov.io/gh/komuw/naz>`__
           -  `Passing continous
              integration <https://circleci.com/gh/komuw/naz>`__
           -  `High grade statically analyzed
              code <https://www.codacy.com/app/komuw/naz/dashboard>`__
        
        Development setup
        -----------------
        
        -  fork this repo.
        -  you need to have python3 installed, this project is python3 only.
        -  cd naz
        -  sudo apt-get install pandoc
        -  open an issue on this repo. In your issue, outline what it is you
           want to add and why.
        -  install pre-requiste software:
        
        .. code:: shell
        
           apt-get -y install pandoc && pip install -e .[dev,test]
        
        -  make the changes you want on your fork.
        -  your changes should have backward compatibility in mind unless it is
           impossible to do so.
        -  add your name and contact(optional) to CONTRIBUTORS.md
        -  add tests
        -  format your code using `black <https://github.com/ambv/black>`__:
        
        .. code:: shell
        
           black --line-length=100 --py36 .
        
        -  run `flake8 <https://pypi.python.org/pypi/flake8>`__ on the code and
           fix any issues:
        
        .. code:: shell
        
           flake8 .
        
        -  run `pylint <https://pypi.python.org/pypi/pylint>`__ on the code and
           fix any issues:
        
        .. code:: shell
        
           pylint --enable=E --disable=W,R,C --unsafe-load-any-extension=y example/ naz/ tests/ cli/
        
        -  run tests and make sure everything is passing:
        
        .. code:: shell
        
           make test
        
        -  open a pull request on this repo.
           NB: I make no commitment of accepting your pull requests.
        
        ## TODO
        -------
        
Keywords: naz,smpp,smpp-client,smpp-protocol,smpp-library
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Security
Classifier: Topic :: System :: Installation/Setup
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Provides-Extra: dev
Provides-Extra: test
