A package for extracting JSON data from Maybank PDF account statements
Project description
Maybank PDF Account Statement to JSON
This package provides functionality to extract and process data from Maybank account statement PDFs. It allows users to read PDF files and extract json data from them.
Installation
To install the package, clone the repository and run the following command:
pip install maybankpdf2json
Usage
Here is a simple example of how to use the package to extract data from a Maybank PDF statement:
import os
from maybankpdf2json import MaybankPdf2Json
# Path to your PDF file and its password
example_path = os.path.join(os.path.dirname(__file__), "test.pdf")
example_password = "12345" # Replace with your actual PDF password
with open(example_path, "rb") as f:
extractor = MaybankPdf2Json(f, example_password)
data = extractor.json()
print(data)
# Output example:
# [
# {
# "date": "01/01/2024",
# "desc": "Deposit from client",
# "trans": 50.0,
# "bal": 1050.0
# },
# {
# "date": "02/01/2024",
# "desc": "Purchase - Office Supplies",
# "trans": -20.0,
# "bal": 1030.0
# }
# ]
Testing
To run the tests, navigate to the project directory and execute:
pytest tests/
Makefile Usage
This project includes a Makefile with helpful commands:
- To run tests:
make test
- To build and release the package (requires proper credentials):
make release
Contributing
Contributions are welcome! Please feel free to submit a pull request or open an issue for any enhancements or bug fixes.
License
This project is licensed under the MIT License. See the LICENSE file for more details.
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 maybankpdf2json-0.1.52.tar.gz.
File metadata
- Download URL: maybankpdf2json-0.1.52.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81d48238cc757e2e07ebce75a2ed82d78e34d558f56828f13f7ad96f1445d57
|
|
| MD5 |
177073165f110aa8a6b904935f4c04b1
|
|
| BLAKE2b-256 |
4d7778853aca61917e88e04f336071ffad62b629f9cb97031880b0ca807bac16
|
File details
Details for the file maybankpdf2json-0.1.52-py3-none-any.whl.
File metadata
- Download URL: maybankpdf2json-0.1.52-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92dde1b55dbdefeceb47e924d9cc7859fd1a2097e9af2611f381ff48c61eccb0
|
|
| MD5 |
d2cb629854875e82f30ccd82e4573ff3
|
|
| BLAKE2b-256 |
5e104f1599bd3fefd9297e000a5b37e426dc16e6e947610dc536b2e78e415c1a
|