Python wrapper for making secure requests to Kuda API
Project description
kudapy
Python wrapper for making secure request to Kuda API
Getting started
- paste your private and public key (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
Using the library
While the repo is not yet on pypi, simply clone this repo and run pipenv install
Library setup
from base_api import kuda
import math
import random
from utils import generate_id, load_private_key, load_public_key
client_key = "name-of-private-key-file"
# load private and public keys
private_key = load_private_key()
public_key = load_public_key()
kuda = kuda(public_key, private_key, client_key) # this initializes the Kuda function
Making a request
kuda(service_type, request_ref, data)
Sample request
# Bank List
#generate a random request_reference
request_ref = math.floor(random.random() * 1000000000000 + 1)
kuda(public_key, private_key, client_key)("BANK_LIST", request_ref)
# expected response is decrypted data from Kuda API
Refer to the Kuda Bank API documentation for respective SERVICE TYPES and DATA TYPES
Contribution & Issues
- Simply fork the repo, make changes and make a pull request
- You can open an issue for support or suggestions
Author
Acknowledgements
- Kuda Bank Team
- Cowrywise Team
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kudapy-0.0.2.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kudapy-0.0.2.tar.gz.
File metadata
- Download URL: kudapy-0.0.2.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using 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.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b80e17db22c28914ce707c95eb80963abecd05de9a29ad001e66b560bfde367d
|
|
| MD5 |
3a5435452ba4f9d8d55f2dd69626b8c0
|
|
| BLAKE2b-256 |
fc15556a3a9d9a2f7f8bc42893c082a3fc999e5a4107eb3fdfe206ec49a12e50
|
File details
Details for the file kudapy-0.0.2-py3-none-any.whl.
File metadata
- Download URL: kudapy-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using 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.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8d7ac0b378f93a00a92d671bc640fc6cb4cc95ca82b8c84a19e8559d4d6c241
|
|
| MD5 |
610bc23c4b76b965948a2f46f3845d8f
|
|
| BLAKE2b-256 |
33b99370dc18c2f17eccfe8c7a0afd36581b96e017f0cd5295b54a7a975e7d3b
|