Skip to main content

PDF parsing for Singaporean banks

Project description



Tests CI Code style: black Linting: pylint License: MIT

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

Install dependencies using Homebrew

brew bundle

Clone the repo

git clone https://github.com/benjamin-awd/monopoly.git

Create a virtual environment and install Python dependencies

pyenv virtualenv 3.11.4 monopoly
pyenv shell monopoly
poetry install

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

  • Monopoly can be run on Google Cloud as a scheduled Cloud Run job.
  • PDFs can be unlocked using explicitly defined passwords and/or a masking pattern like ?d?d?d

Current cloud implementation:

Screenshot

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

monopoly_sg-0.1.1.tar.gz (149.7 kB view hashes)

Uploaded Source

Built Distribution

monopoly_sg-0.1.1-py3-none-any.whl (153.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page