Import Mercury banking transactions into beancount format
Project description
beancount-v3-mercury
beancount-v3-mercury provides an Importer for converting CSV exports of Mercury checking transactions into Beancount format.
Installation
pip install beancount-v3-mercury
# or
uv add beancount-v3-mercury
Usage
Create an import script (e.g. import.py) as follows:
import beancount_mercury
from beangulp import Ingest
importers = [
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'),
]
),
]
if __name__ == '__main__':
Ingest(importers).cli()
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 extract transactions from a Mercury CSV export:
python import.py extract mercury-transactions.csv
Resources
See awesome-beancount for other publicly available Beancount importers.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file beancount_v3_mercury-0.2.0.tar.gz.
File metadata
- Download URL: beancount_v3_mercury-0.2.0.tar.gz
- Upload date:
- Size: 56.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a23485597fcf94eb5d4d610604d48bddf0d3da159c8c4cedb455ef655695f26e
|
|
| MD5 |
c0d22d6eb9faeade32651879b57e0d11
|
|
| BLAKE2b-256 |
2b0037581091d89c4da0241a4dc63416ec320be25e2f541c4a16e550284eb86a
|
File details
Details for the file beancount_v3_mercury-0.2.0-py3-none-any.whl.
File metadata
- Download URL: beancount_v3_mercury-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63b73719bd01f9183ae3a41988ee943139eedc7b849b462f26164f334e9604fc
|
|
| MD5 |
d2755cf280797092bd86c2acb273dc37
|
|
| BLAKE2b-256 |
47f188f77c2a9f90fd5b4b889ed9a86c4c09ac6d1a9158f5827dd007999ada8b
|