Skip to main content

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.1.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kudapy-0.0.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file kudapy-0.0.1.tar.gz.

File metadata

  • Download URL: kudapy-0.0.1.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

Hashes for kudapy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 a81edee4678251c6d593d954672c702c5cb5013d0be6892da4f06457fffe92e0
MD5 dc4ec6ceebefe82544dbc90ba207329e
BLAKE2b-256 3602cc28716a20410dcb85b651a7b30f96cc52798b244eb6817578395aa91eb3

See more details on using hashes here.

File details

Details for the file kudapy-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: kudapy-0.0.1-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

Hashes for kudapy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9a343d53f6474b8823c8aea7b2f0eb87391926ff1efcb1310952d3d0f42a15f2
MD5 a7a223f4f6a279a01f1eb07dc54ad9a8
BLAKE2b-256 98f2901c32040e99ce3e25eeadec9b62ae170c09124c6f4f2e453a5941dcd792

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page