a
Project description
PyMono
[Unofficial] python wrapper for making requests to the Mono API and a webhook implementation.
Features
- Account endpoints [transaction log, statament (json or pdf format)]
- User endpoints [transaction, income and identity]
- Unlink Account
- Misc.
How to Get Started
You would need to get your mono secret key here, and then move to acquire an account ID via the many Mono Connect options.
Installation & Usage Guide
pip install pymono
#Making Requests
from pymono import Account, UserMono, Misc
User Client
mono_user = UserMono(mono_sec_key='xxxxxxxxxxxxxxxx')
# Get Transaction logs
mono_user.transaction(id='xxxxxxxxxxx')
A successful response (status code: 200), otherwise {} (status code: 400)
{
"paging": {
"total": 190,
"page": 2,
"previous": "https://api.withmono.com/accounts/:id/transactions?page=2",
"next": "https://api.withmono.com/accounts/:id/transactions?page=3",
},
"data": [
{
"_id": "xxxxxxxxxxxxxxxxxxxx",
"amount": 10000,
"date": "2020-07-21T00:00:00.000Z",
"narration": "TRANSFER from Emmanuel to Fred",
"type": "debit",
"category": "E-CHANNELS",
},
...,
]
}
Get income
mono_user.income(id='xxxxxxxxxxxx')
Account
py_acc = Account(mono_sec_key='xxxxxxxxxxxxxxxx')
# this represents the account details with the financial institution.
py_acc.information(id='xxxxxxxxxx')
A successful response (status code: 200), otherwise {} (status code: 400)
{
"meta": {
"data_status": "AVAILABLE",
// Available, Processing, Failed
"auth_method": "mobile_banking"
// mobile_banking, internet_banking
},
"account": {
"_id": "5feec8ce95e8dc6axxxxxx",
"institution": {
"name": "GTBank",
"bankCode": "058",
"type": "PERSONAL_BANKING"
// or BUSINESS_BANKING
},....}
}
Misc
Get all institutions currently available on Mono
misc = Misc(mono_sec_key='xxxxxxxxxxxxxxx)
misc.institutions()
A successful reponse is as follow (truncated here)
[
{'name': 'Brass', 'icon': 'https://mono-public-bucket.s3.eu-west-2.amazonaws.com/images/brass_logo.jpeg', 'coverage': {'countries': ['NG'], 'business': True, 'personal': False}, 'products': ['Auth', 'Accounts', 'Transactions', 'Balance', 'Income', 'Identity'], 'website': None}, {'name': 'Ecobank', 'icon': 'https://mono-public-bucket.s3.eu-west-2.amazonaws.com/images/ecobank-icon.png', 'coverage': {'countries': ['NG'], 'business': False, 'personal': True}, 'products': ['Auth', 'Accounts', 'Transactions', 'Balance', 'Income', 'Identity'], 'website': None},
.....
{'name': 'Cowrywise', 'icon': 'https://mono-public-bucket.s3.eu-west-2.amazonaws.com/images/cowrywise-icon.png', 'coverage': {'countries': ['NG'], 'business': False, 'personal': True}, 'products': ['Auth', 'Accounts', 'Transactions', 'Balance', 'Income', 'Identity'], 'website': 'https://cowrywise.com'},
{'name': 'Polaris Bank', 'icon': 'https://mono-public-bucket.s3.eu-west-2.amazonaws.com/images/polaris-bank-icon.png', 'coverage': {'countries': ['NG'], 'business': False, 'personal': True}, 'products': ['Auth', 'Accounts', 'Transactions', 'Balance', 'Income', 'Identity'], 'website': 'https://www.polarisbanklimited.com'}
]
Contribution
Kindly adhere to the following rules:
- fork the repo
- make your changes on a descriptive branch name
- ....and make a pull request ONLY when your tests pass.
Author
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
monopy-1.0.0.tar.gz
(6.6 kB
view hashes)
Built Distribution
monopy-1.0.0-py3-none-any.whl
(8.8 kB
view hashes)