aiompesa
A package for accessing the MPESA Daraja API from asyncio.
Usage
import asyncio
from aiompesa import Mpesa
CONSUMER_KEY = "nF4OwB2XiuYZwmdMz3bovnzw2qMls1b7"
CONSUMER_SECRET = "biIImmaAX9dYD4Pw"
loop = asyncio.get_event_loop()
mpesa = Mpesa(True, CONSUMER_KEY, CONSUMER_SECRET)
token_response = loop.run_until_complete(mpesa.generate_token())
access_token = token_response.get("access_token", None)
expires_in = token_response.get("expires_in", None)
if access_token is None:
print("Error: Wrong credentials used to get the access_token")
else:
print(f"access_token = {access_token}, expires_in = {expires_in} secs")
Requirements
- Python 3.6+
Installation
$ pip install aiompesa
Motivation
- To learn a little more about
asyncioand put it to some practise. - To develop an async wrapper for the Safaricom daraja api.
Contribution
Follow the contribution guidelines
Metadata
Release files for aiompesa 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiompesa-0.0.4.tar.gz | 7.1 kB | Without provenance | Details for aiompesa-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiompesa-0.0.4-py2-none-any.whl | Python 2 | none | any | Details for aiompesa-0.0.4-py2-none-any.whl |
Total release size: 15.3 kB
Release files / aiompesa-0.0.4.tar.gz
| Download URL | aiompesa-0.0.4.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
babc343254d1fad04154f20cc2112625754284eefdad7561e68355d85f481b9e
|
|
BLAKE2b-256 checksum How to use checksums |
bb9456a572ed8f0e3e2e593b4d624b48ef8dc7c45b3d00589f5f5bb362ef301a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6
|
Release files / aiompesa-0.0.4-py2-none-any.whl
| Download URL | aiompesa-0.0.4-py2-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
18c83c102671a72bc33b13631fa3ddecb6a259656f6347a3e5c31a133965a7e4
|
|
BLAKE2b-256 checksum How to use checksums |
9e9a70c715ebfa21ffedbfc98fcbd534bbf495c291fdf1f8b8b3ef3037c882bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.6
|
Security for aiompesa 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.