Skip to main content

Import Mercury banking transactions into beancount format

Project description

beancount-mercury

PyPI CircleCI License

beancount-mercury provides an Importer for converting CSV exports Mercury checking transactions into Beancount v2 format.

Installation

pip install beancount-mercury

Usage

Add the Mercury importer to your account as follows:

import beancount_mercury

CONFIG = [
    beancount_mercury.CheckingImporter(
        'Assets:Checking:Mercury',
        currency='USD',
        account_patterns=[
          # These are example patterns. You can add your own.
          ('GITHUB', 'Expenses:Cloud-Services:Source-Hosting:Github'),
          ('Fedex',  'Expenses:Postage:FedEx'),
        ]
    ),
]

The account_patterns parameter is a list of (regex, account) pairs. For each line in your Mercury CSV, CheckingImporter will attempt to create a matching posting on the transaction by matching the payee or narration to the regexes. The regexes are in priority order, with earlier patterns taking priority over later patterns.

Once this configuration is in place, you can use bean-extract to convert a Mercury CSV export of transactions to beancount format:

bean-extract config.py mercury-transactions.csv

Resources

See awesome-beancount for other publicly available Beancount importers.

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

beancount-mercury-0.1.4.tar.gz (4.4 kB view hashes)

Uploaded Source

Built Distribution

beancount_mercury-0.1.4-py3-none-any.whl (5.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