PDF parsing for Singaporean banks
Project description
Monopoly is a Python library that converts Singapore bank statement PDFs to CSV using pdftotext
Supported banks:
- Citibank
- DBS
- HSBC
- OCBC
- Standard Chartered
Only credit card statements are supported (for now)
Install
Clone the repo
git clone https://github.com/benjamin-awd/monopoly.git
Install dependencies using apt & Homebrew
make setup
Usage
Monopoly can be run as a Python package, allowing you to extract, transform and write bank statements to a CSV file.
To see how Monopoly works, you can run this example
python3 monopoly/examples/single_statement.py
If your PDF is encrypted, you'll have to add the password to a .env file in the root directory, which is automatically read by monopoly
You can use the .env.template and then update values in the .env file
cp .env.template .env
Features
- Support for encrypted PDFs -- passwords can be passed in via a .env file, or passed directly via a bank class
- PDFs can also be unlocked with a static string, and a masking pattern like ?d?d?d for banks like HSBC that use a common password prefix (DOB), but different passwords for each card
- Cashback transactions from Citibank and OCBC are also supported, and appear as "negative" transactions
- Monopoly can be run on Google Cloud as a scheduled Cloud Run job, which opens up more sophisticated use-cases like historical analysis and personal finance visualization
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
File details
Details for the file monopoly_sg-0.3.0.tar.gz
.
File metadata
- Download URL: monopoly_sg-0.3.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fde4e655f1708a0f842f02d0cbdb122665098893c3388c1efdddd01b2791f33c |
|
MD5 | 12b5ab94352a32acd2396d96279b5a97 |
|
BLAKE2b-256 | 2a969f5f3514780c13efd3a03eef072382621eb085dcb264fd01ba1a5b4c590e |
File details
Details for the file monopoly_sg-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: monopoly_sg-0.3.0-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.0 Linux/5.15.133.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a27e1ef64a7404282bf5036b85192dab2098e8255baabadd2676294b4f4fcb8e |
|
MD5 | 3d66a1722dd21d15f666cf5ae64a0ac7 |
|
BLAKE2b-256 | 3e80e04ac244ef3064fce88161aa4003e0e26e7e56d65952aed4121b364272fd |