Monopoly is a Python library & CLI that converts bank statement PDFs to CSV
Project description
Monopoly is a Python library & CLI that converts bank statement PDFs to CSV.
Supported banks:
Bank | Credit Statement | Debit Statement |
---|---|---|
Citibank | :white_check_mark: | :x: |
DBS | :white_check_mark: | :white_check_mark: |
HSBC | :white_check_mark: | :x: |
OCBC | :white_check_mark: | :white_check_mark: |
Standard Chartered | :white_check_mark: | :x: |
🎉 Monopoly is now live! 🎉
Try it out:
https://monopoly.streamlitapp.com/
Install
Clone the repo
git clone https://github.com/benjamin-awd/monopoly.git
Install dependencies using Homebrew
brew install make
make setup
Usage
Monopoly runs in your terminal, allowing you to extract, transform and write bank statements to a CSV file.
To list commands and options:
monopoly --help
You can run it on a single statement
monopoly src/monopoly/examples/example_statement.pdf
or multiple statements
monopoly ./statements
If you need to run monopoly on a password protected file, ensure that passwords are set in the .env file:
cp .env.template env
If you have multiple statements from the same bank with different passwords, make sure to set both passwords in an array format:
HSBC_PDF_PASSWORDS=["password1","password2"]
Monopoly can also be run as a Python library:
python3 src/monopoly/examples/single_statement.py
Features
- Parses PDFs using predefined configuration classes per bank.
- Handles locked PDFs with credentials passed via environment variables.
- Supports a variety of date/number formats and determines if a transaction is debit or credit.
- Provides a generic parser that can be used without any predefined configuration (caveat emptor).
- Includes a safety check (enabled by default) that validates totals for debit or credit statements.
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
Hashes for monopoly_core-0.9.1rc2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27e91cc42a38243558497a4290dc0125d910019c26b6c7298d443c9124a69380 |
|
MD5 | 9f03bf9b616cf5c93fbad928504d3937 |
|
BLAKE2b-256 | 2bb695eb36a88eeb473af54a1a1f23a2b3fb7dcc02dd0df6fcbd39f7d4414fcb |