Metadata-Version: 2.1
Name: qosic-sdk
Version: 4.0.1
Summary: An unofficial python sdk for the QosIc platform.
Home-page: https://github.com/Tobi-De/qosic-sdk
License: MIT
Keywords: python,qosic-sdk,qosic,qos,payment,momo,mobile money
Author: Tobi-De
Author-email: tobidegnon@protonmail.com
Requires-Python: >=3.8,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: httpx (>=0.22.0,<0.23.0)
Requires-Dist: polling2 (>=0.5.0,<0.6.0)
Project-URL: Repository, https://github.com/Tobi-De/qosic-sdk
Description-Content-Type: text/x-rst

qosic-sdk
=========

An unofficial python sdk for the `QosIC <https://www.qosic.com/>`__
platform. This platform provides an api to enable mobile money payments
for businesses in Africa.


.. image:: https://img.shields.io/pypi/v/qosic-sdk.svg
        :target: https://pypi.python.org/pypi/qosic-sdk

.. image:: https://img.shields.io/pypi/pyversions/qosic-sdk
        :target: https://github.com/Tobi-De/qosic-sdk

.. image:: https://api.travis-ci.com/Tobi-De/qosic-sdk.svg
        :target: https://travis-ci.com/Tobi-De/qosic-sdk

.. image:: https://readthedocs.org/projects/qosic-sdk/badge/?version=latest
        :target: https://qosic-sdk.readthedocs.io/en/latest/?version=latest
        :alt: Documentation Status

.. image:: https://img.shields.io/apm/l/atomic-design-ui.svg?
        :target: https://github.com/Tobi-De/qosic-sdk/blob/master/LICENSE

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
        :target: https://github.com/psf/black

----

-  Free software: MIT license
-  Documentation: https://qosic-sdk.readthedocs.io.

Features
--------

-  Simple synchronous client to make your payment requests
-  Cover 100% of Qosic public api
-  Clean and meaningful exceptions
-  100 % test coverage
-  Configurable timeouts

Quickstart
----------

For those of you in a hurry, here’s a sample code to get you started.

.. code:: shell

       pip install qosic-sdk

.. code:: python3


       from dotenv import dotenv_values
       from qosic import Client, MTN, MOOV

       config = dotenv_values(".env")

       moov_client_id = config.get("MOOV_CLIENT_ID")
       mtn_client_id = config.get("MTN_CLIENT_ID")
       server_login = config.get("SERVER_LOGIN")
       server_pass = config.get("SERVER_PASSWORD")
       # This is just for test purpose, you should directly pass the phone number
       phone = config.get("PHONE_NUMBER")


       def main():
           client = Client(
               login=server_login,
               password=server_pass,
               providers=[MTN(id=mtn_client_id), MOOV(id=moov_client_id)],
           )
           result = client.pay(phone=phone, amount=500, first_name="User", last_name="TEST")
           print(result)
           if result.success:
               print(f"Everything went fine")

           result = client.refund(reference=result.reference)
           print(result)


       if __name__ == "__main__":
           main()

Credits
-------

This package was created with
`Cookiecutter <https://github.com/audreyr/cookiecutter>`__ and the
`audreyr/cookiecutter-pypackage <https://github.com/audreyr/cookiecutter-pypackage>`__
project template.


