https://github.com/tralahm/pympesa
Clean Wrapper library around Safaricom's daraja Mpesa api pip install daraja-mpesa
https://github.com/tralahm/pympesa
b2b b2c balance c2b mpesa mpesa-api mpesa-api-python mpesa-payments mpesa-sdk mpesa-stk payment-integration pypi-package python reversal safaricom-daraja-python tralahm wrapper-library
Last synced: 8 months ago
JSON representation
Clean Wrapper library around Safaricom's daraja Mpesa api pip install daraja-mpesa
- Host: GitHub
- URL: https://github.com/tralahm/pympesa
- Owner: TralahM
- License: gpl-3.0
- Created: 2019-10-06T03:26:51.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-13T19:58:56.000Z (almost 3 years ago)
- Last Synced: 2025-04-09T16:13:48.298Z (about 1 year ago)
- Topics: b2b, b2c, balance, c2b, mpesa, mpesa-api, mpesa-api-python, mpesa-payments, mpesa-sdk, mpesa-stk, payment-integration, pypi-package, python, reversal, safaricom-daraja-python, tralahm, wrapper-library
- Language: Python
- Homepage: https://pympesa.readthedocs.io/
- Size: 343 KB
- Stars: 12
- Watchers: 1
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.rst
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://travis-ci.com/TralahM/pympesa)
[](https://opensource.org/licenses/MIT)
[](https://github.com/TralahTek)
[](https://www.python.org/)
[](http://dwyl.io/TralahM/pympesa)
[](http://inch-ci.org/github/TralahM/pympesa)
[](https://pypi.python.org/pypi/ansicolortags/)
[](https://github.com/TralahM/pull/)
[](https://gitHub.com/TralahM/pympesa/pull/)
[](https://github.com/TralahM/pympesa).
# pympesa.
# Description
This is an unofficial wrapper providing convenient access to the Safaricom MPESA Daraja API for applications written in Python.
It has been tested with Python 2 & 3
### Setup and Installation
```Bash
pip install daraja-mpesa
```
You can also clone or download the library package and install it using setuptools:
``` bash
git clone https://github.com/TralahM/pympesa.git
cd pympesa
python setup.py install
```
### Tests
The library comes with simple integration tests with Safaricom's sandbox APIs. Due to factors beyond my control, the tests are structured to pass even when a specific Daraja API is under maintenance. To run the tests, simply execute pytest from the library's root directory:
``` bash
pytest
```
### Usage
``` python
from mpesa.api. import
```
***API***
The following APIs are supported:
- transaction_status
- mpesa_express
- reversal
- balance
- auth
- b2c
- c2b
- b2b
***API Class***
The following are the corresponding API classes:
- TransactionStatus
- MpesaExpress
- Reversal
- Balance
- MpesaBase
- B2B
- C2B
- B2C
[](https://github.com/TralahM)
[](https://github.com/TralahM)
# Documentation
[Read the Docs](https://pympesa.readthedocs.io)
# Dependencies
# How to Install
## Building from Source for Developers
```Bash
git clone https://github.com/TralahM/pympesa.git
cd pympesa
python setupy bdist_wheel
python setupy install
```
# Contributing
[See the Contributing File](CONTRIBUTING.rst)
[See the Pull Request File](PULL_REQUEST_TEMPLATE.md)
# Support
# LICENCE
[Read the license here](LICENSE)
# Acknowledgements