Skip to main content

Import CapitalOne banking transactions into beancount format

Project description

beancount-capitalone

PyPI CircleCI License

beancount-capitalone provides an Importer for converting CSV exports Capital One bank transactions into Beancount v2 format.

Installation

pip install beancount-capitalone

Usage

Credit Cards

Add the Capital One Credit card importer to your account as follows:

import beancount_capitalone

CONFIG = [
    beancount_capitalone.CreditImporter(
        'Liabilities:Credit-Cards:CapitalOne',
        currency='USD',
        lastfour='1234', # Replace with last four digits of your account
        account_patterns=[
          # These are example patterns. You can add your own.
          ('GITHUB', 'Expenses:Cloud-Services:Source-Hosting:Github'),
          ('Fedex',  'Expenses:Postage:FedEx'),
        ]
    ),
]

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

bean-extract config.py 2023-03-10_transaction_download.csv

API

account_patterns

The account_patterns parameter is a list of (regex, account) pairs. For each line in your CSV, the CapitalOne importer will attempt to create a matching posting on the transaction by matching the payee, narration, or the concatenated pair to the regexes.

The regexes are in priority order, with earlier patterns taking priority over later patterns.

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-capitalone-0.1.1.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

beancount_capitalone-0.1.1-py3-none-any.whl (5.4 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