Skip to main content

Various custom importers for beancount.

See the list of supported importers.

Installation

$ pipx install beancount-importers

Usage

beancount-importer expects to be run from within your ledger folder, with a config.toml file configured with your account details and your patterns. The file format accepts an optional beancount-importer.patterns list containing items in the following format:

[
    'narration' | 'payee' | 'either' | 'both',
    'Account:Name',
    '^regex$',
]

Note that if using the both target kind, the payee and narration will be concatendated with a semicolon (;) for the purpose of parsing, eg.:

['both', 'Income:Salary', '^My Company;Salary$'],

If beancount-importer.patterns is specified, all definitions in that list will be applied to all your accounts.

Any transaction which does not balance – for example, one whose payee and narration matched none of your patterns – has the remaining amount booked to a default account and flagged with a ! for review. Positive residuals go to Expenses:Unknown and negative residuals to Equity:Unknown by default. Override these with the optional default_expense_account and default_equity_account keys:

[beancount-importer]
default_expense_account = 'Expenses:TODO'
default_equity_account = 'Income:TODO'

In this file, you should also list each of your accounts, eg.

[[beancount-importer.paypal]]
account = 'Assets:Paypal'

[[beancount-importer.tangerine]]
account = 'Assets:Tangerine:Checking'
lastfour = '1234'

[[beancount-importer.tangerine]]
account = 'Liabilities:Tangerine:Mastercard'
lastfour = '5678'
patterns = [...]

You can specify any number of accounts, including multiple of the same kind, so long as they parse with separate filenames. This will be verified when you run identify – any ambiguous filenames will produce an error, in which case you’ll need to handle those accounts separately. The patterns list follows the same parsing as the above global patterns object and is optional on a per-account basis; if specified, those patterns will be appended to your global pattern list and apply only to this account.

$ cd /my-beancount/ledger
$ cat config.toml
[beancount-importer]
patterns = [
    ['payee', 'Income:Salary', '^My Employer.*$'],
]

[[beancount-importer.tangerine]]
account = 'Assets:Tangerine:Checking'
lastfour = '1234'
patterns = [
    ['payee', 'Income:Tangerine:Checking:Interest', '^Interest Paid$'],
]

# Check downloaded files for errors
$ bean-import identify -v ~/Downloads

# Reconcile issues, fix parsing, adjust patterns, etc
$ bean-import extract -xe index.beancount ~/Downloads
$ vim config.toml
$ # ...repeat until no errors...

# Actually import the new data
# Note that all new data will be emitted. If your ledger files are split by
account, the easiest way to manage this is to paste into files manually:
$ bean-import extract -e index.beancount ~/Downloads | pbcopy
$ vim relevant-account-file.beancount  # paste
# If you instead use a single ledger file or a new file for each
# reconciliation pass, you can use the `-o outputfile` flag to the
# `extract` # command.

# Archive parsed statements
$ bean-import archive -o docs ~/Downloads

# Verify everything reconciled properly (command provided by beancount)
$ bean-check index.beancount

# View your ledger (command provided by fava)
$ fava index.beancount

Metadata

Release files for beancount-importer 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for beancount-importer 0.3.0
File Size Uploaded
beancount_importer-0.3.0.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for beancount-importer 0.3.0
File Interpreter ABI Platform
beancount_importer-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 39.1 kB

Release files / beancount_importer-0.3.0.tar.gz

Download URL beancount_importer-0.3.0.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
abe5324cda102f0e07510fad4336eb1473b94a6492e6e0862a1b6e99ebf0292b
BLAKE2b-256 checksum
How to use checksums
9024f08ddc50a738524f960e9229a307682bcb17ea7853abec562302d84ba112
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release files / beancount_importer-0.3.0-py3-none-any.whl

Download URL beancount_importer-0.3.0-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9695d782a0fea56d3afbfbca5618973906f836700d9728ed7abe228965f2a0bf
BLAKE2b-256 checksum
How to use checksums
e0be2c653ca74f8cc604ac1a632e94b43cf9dfa4cd3b016e2de842a86bcb296b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page