kudapy
Python wrapper for making secure requests to Kuda API
Getting started
- register on kuda bank website to recieve public and private keys in xml format
- paste your private and public keys (both in PEM format) in your project directory - both keys come in XML format(YOU NEED TO CONVERT FROM XML TO PEM)
- Your client key is the name of your private key file sent after registration on kuda bank website.
Installation
pip install kudapy
Making a request
from kudapy import kuda
"""
Save your public and private pem file somewhere on the filesystem. Specify the full path to your keys
then create a Kuda Object instance. Also provide a client key string and base url (for production).
"""
kuda_instance = Kuda(path_to_public_key, path_to_private_key, client_key_string, base_url)
#Use the kuda instance to call the appropiate methods of the
#action you want to perform.
#For available actions run help(kuda)
Sample requests
# List of banks
kuda_instance.bank_list()
-------------------------
# Name enquiry
kuda_instance.name_enquiry("1100000734", "999129")
-------------------------
# Create a virtual account
# (Provide email, phone, lastname, firstname)
kuda_instance.create_virtual_account(
"okonkwo_yusuf@kudabank.com",
"07011111111",
"Okonkwo",
"Yusuf"
)
--------------
## Expected response is decrypted data from Kuda API in JSON
"""
You get back two values from the method calls, status and data. If status is true, there is a valid response data else
the status will be False - with data being the error message.
"""
status, data = kuda_instance.bank_list()
(True, {'Status': True, 'Message': 'Completed Successfully', ...})
or
status, data = kuda_instance.name_enquiry('0000000000', 999000')
(False, 'Cannot validate account number at this time, Please try again')
Contribution & Issues
- Simply fork the repo, make changes and make a pull request
- You can open an issue for support or suggestions
Author
Contributor
Acknowledgements
- Kuda Bank Team
- Cowrywise Team
Metadata
Release files for kudapy 2.0
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 |
|---|---|---|---|---|
| kudapy-2.0.tar.gz | 7.5 kB | Without provenance | Details for kudapy-2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kudapy-2.0-py3-none-any.whl | Python 3 | none | any | Details for kudapy-2.0-py3-none-any.whl |
Total release size: 16.8 kB
Release files / kudapy-2.0.tar.gz
| Download URL | kudapy-2.0.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c868d5d450a3c4461e88dd78766539eb085c821ae1289673e3b8aa5626b92806
|
|
BLAKE2b-256 checksum How to use checksums |
952364c71d474ab4901889341dc81fa926d5e4aa5ead2b34d8bc5392455baf0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5
|
Release files / kudapy-2.0-py3-none-any.whl
| Download URL | kudapy-2.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
143420a95955ac8feb9c0569987eedc8d10e7b2fae99a17da1a084116bc2242c
|
|
BLAKE2b-256 checksum How to use checksums |
5098cda9d76a906f8dd39e7f047c282c1dc60e87715f83d9993d3f19350d8dcb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.5
|
Security for kudapy 2.0
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.