Monopoly is a Python library & CLI that converts bank statement PDFs to CSV.
Supported banks:
| Bank | Credit Statement | Debit Statement |
|---|---|---|
| Bank of America | ✅ | ✅ |
| Bank of Montreal (BMO) | ✅ | ✅ |
| Canadian Imperial Bank of Commerce (CIBC) | ✅ | ✅ |
| Canadian Tire Bank | ✅ | ❌ |
| Capital One Canada | ✅ | ❌ |
| Chase | ✅ | ❌ |
| Citibank | ✅ | ❌ |
| DBS/POSB | ✅ | ✅ |
| HSBC | ✅ | ❌ |
| Maybank | ✅ | ✅ |
| OCBC | ✅ | ✅ |
| Royal Bank of Canada (RBC) | ✅ | ✅ |
| Schwab Bank | N/A | ✅ |
| Scotiabank | ✅ | ✅ |
| Standard Chartered | ✅ | ❌ |
| TD Canada Trust | ✅ | ✅ |
| Trust | ✅ | ❌ |
| UOB | ✅ | ✅ |
| US Bank | ✅ | ❌ |
| Zürcher Kantonalbank | ❌ | ✅ |
Install
Monopoly is a pip-installable Python package on PyPI under the name monopoly-core.
Since Monopoly uses pdftotext, you'll need to install additional dependencies:
apt-get install build-essential libpoppler-cpp-dev pkg-config ocrmypdf
or
brew install gcc@11 pkg-config poppler ocrmypdf
Then install with pipx:
pipx install monopoly-core
For additional OCR support:
pipx install 'monopoly-core[ocr]'
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
To keep the output filename the same as the input (with a .csv extension), pass:
monopoly path/to/file.pdf --output ./out --preserve-filename
If you need to run monopoly on a password protected file, ensure that passwords are set in the .env file:
cp .env.template .env
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 adding OCR for image-based bank statements.
- 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.
Development
Clone the repo
git clone https://github.com/benjamin-awd/monopoly.git
Install dependencies using Homebrew
brew install make
make setup
brew bundle
Metadata
Release files for monopoly-core 0.21.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| monopoly_core-0.21.6.tar.gz | 3.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| monopoly_core-0.21.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.1 MB
Release files / monopoly_core-0.21.6.tar.gz
| Download URL | monopoly_core-0.21.6.tar.gz |
|---|---|
| Size | 3.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0810fbe958324f8a840a1a9f74bd657d3b253923fb61957598e3378f658c9dbd
|
|
BLAKE2b-256 checksum How to use checksums |
7e56a506c7775d7adabccc2a0c3979ba6cb2df759cf0d249f81fc67e259d1635
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / monopoly_core-0.21.6-py3-none-any.whl
| Download URL | monopoly_core-0.21.6-py3-none-any.whl |
|---|---|
| Size | 273.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f2d1796b2e17512b89042144e925eb6da5b239bca326ab992d20e4120717d15
|
|
BLAKE2b-256 checksum How to use checksums |
d57f7606a58dbbd8fe53a2b8ab9dee4e9a632c72eb6a38af6cd93cd271e7c27d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.6 {"installer":{"name":"uv","version":"0.12.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|