A command line app for interacting with Korapay's API
Project description
Korapay CLI
A command line app for interacting with Korapay's API. Built with Typer and korapay-client
Installation
Korapay CLI can be installed from pypi with pip as shown below.
pip install korapay-cli
or with uv
uv tool install korapay-cli
First time configurations
You're required to add your korapay integration credentials (i.e. public key,secret key and encryption key) to the cli
on first use as shown below. This package provides korapay and kp as the cli's entry point
korapay config crendtials
# or
kp config crendtials
This sets up your korapay cli for use in development mode if the test secret key is used. This credentials can be
removed with korapay reset or kp reset. The credentials are stored in $HOME/.config/.korapay-cli/.settings.json
for mac and linux and C:\Users\<user>\AppData\Local\.korapay-cli/.settings.json on windows
Run korapay --help or kp --help to see available commands
Examples
Resolve an account number
# kp or korapay resolve-bank-account [BANK_CODE] [ACCOUNT_NUMBER]
kp resolve-bank-account 214 5273681014
Running the command above should yield a result similar to the dump shown below
Response(status_code=200, status=True, message='Request completed', data={'bank_name': 'FCMB Plc', 'bank_code': '214', 'account_number': '5273681014', 'account_name': 'ADEYI GBENGA MICHAEL'})
By default, the results you get from the cli is a Response object which is a pydantic model returned
by korapay-client. To get a json result, use the --json
flag.
# kp or korapay resolve-bank-account [BANK_CODE] [ACCOUNT_NUMBER]
kp resolve-bank-account 214 5273681014 --json
Running the command above should yield a result similar to the dump shown below
{"bank_name": "FCMB Plc", "bank_code": "214", "account_number": "5273681014", "account_name": "ADEYI GBENGA MICHAEL"}
Source code
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 korapay_cli-0.1.0.tar.gz.
File metadata
- Download URL: korapay_cli-0.1.0.tar.gz
- Upload date:
- Size: 18.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e767ccab9706ca0900d31564abce24c171dc5ecb248f4eabeb7fd95537a2626
|
|
| MD5 |
ff47b9add858135ef5208b7e2c3b4947
|
|
| BLAKE2b-256 |
2c53a749482891bb81a03cb25914f95e31ebc6cc1de52c19f02b961742f7e7e3
|
File details
Details for the file korapay_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: korapay_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.29
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aff75e30622dc88177069ddd9e15d22a46c79fafa6491628318fd017b31a1a1
|
|
| MD5 |
1e8705b9a935a55681b128a0d6f6639c
|
|
| BLAKE2b-256 |
fa0326007e792796617e93dcc736504e107f89e0656247831d34edb461a9f8e5
|