Skip to content

Commit 6454fa5

Browse files
authored
Merge pull request #17 from thedtvn/feat/big-update
Feat/big update
2 parents 699d525 + 914f6cc commit 6454fa5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2700
-919
lines changed

.gitignore

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ celerybeat.pid
130130
# Environments
131131
.env
132132
.venv
133+
133134
env/
134135
venv/
135136
ENV/
@@ -165,10 +166,17 @@ cython_debug/
165166
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166167
# and can be added to the global gitignore or merged into this file. For a more nuclear
167168
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168-
#.idea/
169+
.idea/
169170

170171
# Ruff stuff:
171172
.ruff_cache/
172173

173174
# PyPI configuration file
174-
.pypirc
175+
.pypirc
176+
177+
# Documentation
178+
!docs/templates/
179+
docs/**/*.html
180+
docs/**/*.js
181+
docs/**/*.css
182+
!docs/templates/**/*

.readthedocs.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
# Required
66
version: 2
77

8-
98
build:
109
os: ubuntu-22.04
1110
tools:
@@ -17,17 +16,6 @@ build:
1716
- python3-setuptools
1817
- gcc
1918
commands:
20-
- pip install pip-tools
21-
- pip-compile docs/requirements.in
22-
- pip install -r docs/requirements.txt
19+
- pip install pdoc
2320
- pip install .
24-
- python docs/gen_doc.py
25-
- mkdocs build -d $READTHEDOCS_OUTPUT/html/
26-
27-
mkdocs:
28-
configuration: mkdocs.yml
29-
30-
# Optionally declare the Python requirements required to build your docs
31-
python:
32-
install:
33-
- requirements: docs/requirements.txt
21+
- python docs_gen.py --rtfd

README.MD

Lines changed: 83 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,95 @@
11
# MBBank API for Python
2-
A unofficially lightweight Python Api for the "Military Commercial Joint Stock Bank" personal account
32

4-
## Why we have this lib ?
3+
An unofficial, lightweight Python API for the "Military Commercial Joint Stock Bank" (MBBank) personal accounts.
54

6-
Because I don't want to lose money on some api services like [casso.vn](https://casso.vn/) or [payos.vn](https://payos.vn/)
7-
when have freemium tier but with limit :>
5+
> [!WARNING]
6+
> This library is unofficial and not endorsed by MBBank. Use it at your own risk.
87
9-
What you need that it use this lib to make your own code so you can use it free forever
8+
## Features
109

11-
[Documentation & FAQ](http://mbbank.rtfd.io/)
10+
- **Login**: Authenticate with your MBBank credentials.
11+
- **Balance**: Check account balances.
12+
- **Transaction History**: Retrieve transaction history for your accounts.
13+
- **Transfer**: Perform money transfers to another account*.
14+
- **Async Support**: Includes asynchronous capabilities for better performance.
1215

13-
## Requires
14-
- [onnx with cuda](https://onnxruntime.ai/getting-started) (optional if you want to use cuda gpu)
16+
> [!NOTE]
17+
> Transfer feature requires MBBank APP on your phone to scan OTP code and confirm the transfer.
1518
16-
- python3
17-
18-
## Install
19-
pip install mbbank-lib
20-
or Dev Ver
21-
22-
pip install git+https://github.com/thedtvn/MBBank
19+
## Installation
20+
21+
### From PyPI
22+
23+
```bash
24+
pip install mbbank-lib
25+
```
26+
27+
### From Source (Development Version)
28+
29+
```bash
30+
pip install git+https://github.com/thedtvn/MBBank
31+
```
32+
33+
## Requirements
34+
35+
- Python 3.x
36+
- [onnxruntime-gpu](https://onnxruntime.ai/getting-started) (Optional, for CUDA GPU support)
37+
38+
## Quick Start
39+
40+
Here is a simple example of how to log in and fetch your account balance:
41+
42+
```python
43+
import mbbank
44+
45+
def main():
46+
username = "YOUR_USERNAME"
47+
password = "YOUR_PASSWORD"
48+
49+
try:
50+
mb = mbbank.MBBank(username=username, password=password)
51+
52+
# Get balance information
53+
balance_info = mb.getBalance()
54+
55+
if balance_info.acct_list:
56+
print(f"Login successful! Found {len(balance_info.acct_list)} account(s).")
57+
for acct in balance_info.acct_list:
58+
print(f"Account: {acct.acctNo} - Balance: {acct.currentBalance} {acct.currency}")
59+
else:
60+
print("Login successful, but no accounts found.")
61+
62+
except Exception as e:
63+
print(f"An error occurred: {e}")
64+
65+
if __name__ == "__main__":
66+
main()
67+
```
68+
69+
For more examples, check the [examples directory](https://github.com/thedtvn/MBBank/tree/main/examples) or [docs](http://mbbank.rtfd.io/)
70+
71+
## Documentation
72+
73+
For detailed documentation and FAQ, visit: [http://mbbank.rtfd.io/](http://mbbank.rtfd.io/)
74+
75+
## Related Projects
76+
77+
- [Payment QR Code Generator (vietqr.io)](https://vietqr.io/)
78+
- [MBBank JS API](https://github.com/CookieGMVN/MBBank)
79+
- [MBBank OCR](https://github.com/thedtvn/mbbank-capcha-ocr)
2380

2481
## Donate
25-
If you like this project and want to support it, you can do so by donating via the following methods:
26-
- **Momo**: 0961291206
27-
- **ZaloPay**: 0961291206
28-
- **Banking**:
29-
- Techcombank - NGUYEN DUONG TUAN
30-
- Account Nickname: THEDTVN
31-
- Account Nuber: 9612912060
3282

33-
## Extra Info
34-
- Payment QR Code Generator
35-
- [vietqr.io](https://vietqr.io/)
83+
If you find this project helpful, you can support the developer:
84+
85+
- **Momo**: 0961291206
86+
- **ZaloPay**: 0961291206
87+
- **Banking**:
88+
- Bank: Techcombank
89+
- Account Name: NGUYEN DUONG TUAN
90+
- Account Number: 9612912060
91+
- Nickname: THEDTVN
3692

37-
- [MBBank JS API](https://github.com/CookieGMVN/MBBank)
93+
## License
3894

39-
- [MBBank OCR](https://github.com/thedtvn/mbbank-capcha-ocr)
95+
This project is licensed under the MIT License. See the [LICENSE](LICENSE.txt) file for details.

docs/gen_doc.py

Lines changed: 0 additions & 102 deletions
This file was deleted.

docs/index.md

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/requirements.in

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/templates/preload/index.css

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* index.css — styles for preload/index.html */
2+
:root{
3+
--bg: #0f1724;
4+
--card: #0b1220;
5+
--text: #e6eef8;
6+
--muted: #9fb0c8;
7+
--accent: #4fb3ff;
8+
}
9+
10+
*{box-sizing:border-box}
11+
html,body{height:100%}
12+
body{
13+
margin:0;
14+
font-family: Inter, Segoe UI, Roboto, "Helvetica Neue", Arial, sans-serif;
15+
background: linear-gradient(180deg,#071023 0%, #071a2a 100%);
16+
color:var(--text);
17+
-webkit-font-smoothing:antialiased;
18+
-moz-osx-font-smoothing:grayscale;
19+
}
20+
21+
.container{
22+
max-width:900px;
23+
margin:48px auto;
24+
padding:28px;
25+
background:rgba(10,18,28,0.6);
26+
border-radius:12px;
27+
box-shadow:0 10px 30px rgba(2,6,23,0.6);
28+
}
29+
30+
.hero h1{margin:0 0 8px;font-size:28px}
31+
.lead{color:var(--muted);margin:0 0 18px}
32+
33+
h2{color:var(--accent);margin-top:26px}
34+
section p{line-height:1.6;color:var(--text);margin:8px 0}
35+
ul{margin:8px 0 16px 20px;color:var(--text)}
36+
dl{margin:8px 0}
37+
dt{font-weight:600;margin-top:12px;color:var(--accent)}
38+
dd{margin:6px 0 12px 0;color:var(--muted)}
39+
40+
a{color:var(--accent);text-decoration:none}
41+
a:hover{text-decoration:underline}
42+
43+
footer.footnote{margin-top:20px;border-top:1px dashed rgba(255,255,255,0.04);padding-top:12px;color:var(--muted);font-size:13px}
44+
45+
/* small screens */
46+
@media (max-width:520px){
47+
.container{margin:18px;padding:18px}
48+
.hero h1{font-size:20px}
49+
}
50+

0 commit comments

Comments
 (0)