Coder Social home page Coder Social logo

mono-python's Introduction

PyMono

pymono is a python wrapper for Mono

  • Account
  • Transactions
  • Statements
  • Credits
  • Debits
  • Bvn Lookup

Getting Started

  • Register on Mono website and get your Authorization key.
  • Setup your mono connect with your mono public key
  • Set Your "MONO-SEC-KEY" env

Installing

   pip install -U Py-Mono

Usage

Environment Key

os.environ['MONO-SEC-KEY'] = " "

Usage

Import

   from pymono import Mono

Exchange Key or Authenticaton

Set your mono-code accpeted from mono-connect widget.

   mono= Mono('mono-code')
   (data,status) = mono.Auth()

User Id

set the user id to get other function working

   mono.SetUserId(data.get("id"))

Account

The user account details is returned

   mono.getAccount()

Transactions

params example
start "1-10-2020"
end "7-11-2020"
narration uber etc
types debit, credit
paginate true ,false
   
   #Get all the transactions without filter
   mono.getTransactions()
     
   #Parameter accepted  to  filter  Transaction  
   mono.getTransactions(start="",end=" ",narration="",types="",paginate="")

Statement

The user statement of account is returned

It accept parameter to filter statement

params example
month last6month,last12month
output json, pdf
   mono.getStatement()  
   # statement with filter
   mono.getStatement("last12month","pdf")

Credits

get credits details if user

   mono.getCredits()     

Debits

   mono.getDebits()

Identity

   mono.getIdentity()     

BVN Lookup

params example
bvn 2256244
   mono.bvn_lookup(bvn)

Sanbox to test mono-connect

LICENSE

MIT LICENSE

Contribution guides

Todo

  • Webhook Support

mono-python's People

Contributors

hamzzy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mono-python's Issues

getAccount and getStatement isn't working

i keep geting this error

({'message': 'This account does not exist.'}, 404) Traceback (most recent call last): File "/Users/josepholadokun/Desktop/juice/sumer/mono/user_details.py", line 17, in <module> account = mono.getAccount() File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pymono/Mono.py", line 25, in getAccount return self._handle_request("GET", "accounts/" + self.GetUserId()) TypeError: can only concatenate str (not "NoneType") to str

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.