A unofficially light weight Python Api for the "Military Commercial Joint Stock Bank" accounts
Project description
MBBank API for Python
A unofficially light weight Python Api for the "Military Commercial Joint Stock Bank" account
Why we have this lib ?
Because I don't want to lose money on some api services like casso.vn or payos.vn when have freemium tier but with limit :>
what you need that it use this lib to make your own code so you can use it free forever
Requires
and python3
Install
pip install mbbank-lib
or Dev Ver
pip install git+https://github.com/thedtvn/MBBank
How to Use
sync
import datetime
import mbbank
mb = mbbank.MBBank(username="<account number>", password="<account password>" [, tesseract_path="path/to/tesseract"])
daynow = datetime.datetime.now()
lasttime = daynow - datetime.timedelta(weeks=4*3) # maximum time 3 Month
mb.getTransactionAccountHistory(from_date=lasttime, to_date=daynow [, accountNo="<sub account number default is main account number>"])
mb.getCardTransactionHistory(cardNo="<get `cardNo` key from card json obj in `getCardList`>", from_date=lasttime, to_date=daynow)
mb.getBalance()
mb.getBalanceLoyalty()
mb.getInterestRate()
mb.getFavorBeneficiaryList(transactionType= "TRANSFER" or "PAYMENT", searchType="MOST" or "LATEST")
mb.getCardList()
mb.getSavingList()
mb.getLoanList()
mb.userinfo()
async
import asyncio
import mbbank
import datetime
async def main():
mb = mbbank.MBBankAsync(username="<account number>", password="<account password>" [, tesseract_path="path/to/tesseract"])
daynow = datetime.datetime.now()
lasttime = daynow - datetime.timedelta(weeks=4*3) # maximum time 3 Month
await mb.getTransactionAccountHistory(from_date=lasttime, to_date=daynow [, accountNo="<sub account number default is main account number>"])
await mb.getCardTransactionHistory(cardNo="<get `cardNo` key from card json obj in `getCardList`>", from_date=lasttime, to_date=daynow)
await mb.getBalance()
await mb.getBalanceLoyalty()
await mb.getInterestRate()
await mb.getFavorBeneficiaryList(transactionType= "TRANSFER" or "PAYMENT", searchType="MOST" or "LATEST")
await mb.getCardList()
await mb.getSavingList()
await mb.getLoanList()
await mb.userinfo()
asyncio.run(main())
and all this is return json for you have full control your data
Extra Info
- Payment QR Code Generator
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
mbbank_lib-0.1.3.tar.gz
(11.3 kB
view details)
Built Distribution
File details
Details for the file mbbank_lib-0.1.3.tar.gz
.
File metadata
- Download URL: mbbank_lib-0.1.3.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc55f393d2341a9b3cbe33898f6050e41873a9e30a2277ff8f26e9933f38a0fd |
|
MD5 | ae332674265c971b7fc9b413f57a8563 |
|
BLAKE2b-256 | 2dbe74e395fcfc856dca9239f875935cbdd0bcca3d90e7487712a28ce5fec890 |
File details
Details for the file mbbank_lib-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: mbbank_lib-0.1.3-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61bdb040a594fc4e954a4a40bc848d0af65d4bb3fa319f81a9f5f827e7598e90 |
|
MD5 | 11d5021f94e0d46a34d4b68427a83c38 |
|
BLAKE2b-256 | c43664851459c91bfbd6516fcce838d528cdc3879e05f847996c20497884a043 |