Metadata-Version: 2.1
Name: qosic-sdk
Version: 5.1.0
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.9,<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.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Dist: httpx (>=0.27.0,<0.28.0)
Requires-Dist: polling2 (>=0.5.0,<0.6.0)
Requires-Dist: shibuya (>=2024.3.1,<2025.0.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://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/badge/license-MIT-blue.svg
        :target: https://github.com/Tobi-De/qosic-sdk/blob/main/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, bj

       config = dotenv_values(".env")

       moov_client_id = config.get("MOOV_CLIENT_ID")
       mtn_client_id = config.get("MTN_CLIENT_ID")

       login = config.get("SERVER_LOGIN")
       password = config.get("SERVER_PASSWORD")

       def main():
           phone = "229XXXXXXXX"
           mobile_carriers = [bj.MTN(id=mtn_client_id), bj.MOOV(id=moov_client_id)]
           client = Client(login=login, password=password, mobile_carriers=mobile_carriers)

           result = client.pay(phone=phone, amount=500)
           print(result)
           if result.success:
               print(f"Everything went fine")

           result = client.refund(reference=result.reference, phone=phone)
           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.


