Beancount Importer for DKB CSV exports
Beancount DKB Importer
$ pip install beancount-dkb
In case you prefer installing from the Github repository, please note that
master is the development branch so
stable is what you should be installing
If you're not familiar with how to import external data into Beancount, please read this guide first.
Adjust your config file to include
(depending on what account you're trying to import).
A sample configuration might look like the following:
from beancount_dkb import ECImporter, CreditImporter IBAN_NUMBER = 'DE99 9999 9999 9999 9999 99' # your real IBAN number CARD_NUMBER = '9999 9999 9999 9999' # your real Credit Card number CONFIG = [ ECImporter( IBAN_NUMBER, 'Assets:DKB:EC', currency='EUR', file_encoding='utf-8', ), CreditImporter( CARD_NUMBER, 'Assets:DKB:Credit', currency='EUR', file_encoding='utf-8', ) ]
Once this is in place, you should be able to run
bean-extract on the command
line to extract the transactions and pipe all of them into your Beancount file.
$ bean-extract /path/to/config.py transaction.csv >> you.beancount
Transaction Codes as Meta Tags
By default, the ECImporter prepends the transaction code ("Buchungstext") to the transaction description. To achieve shorter descriptions and use meta tags to query for certain transaction codes, the importer may be configured to store the transaction code in a user provided meta tag.
The following configuration instructs the importer to use a meta tag
store transaction codes:
... CONFIG = [ ECImporter( IBAN_NUMBER, 'Assets:DKB:EC', currency='EUR', meta_code='code', ), ...
This is how an example transaction looks without the option:
2021-03-01 * "Kartenzahlung" "XY Supermarket" Assets:DKB:EC -133.72 EUR
And this is the resulting transaction using
2021-03-01 * "XY Supermarket" code: Kartenzahlung Assets:DKB:EC -133.72 EUR
ERROR:root:Importer beancount_dkb.ec.ECImporter.identify() raised an unexpected error: 'utf-8' codec can't decode byte 0xf6 in position 17: invalid start byte
file_encoding parameter. It seems like the CSV
ISO-8859-1 encoded, but
seems like a useful default.
Contributions are most welcome!
Please make sure you have Python 3.6+ and Poetry installed.
- Clone the repository:
git clone https://github.com/siddhantgoel/beancount-dkb
- Install the packages required for development:
- That's basically it. You should now be able to run the test suite:
poetry run py.test.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size beancount_dkb-0.12.0-py3-none-any.whl (10.1 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size beancount-dkb-0.12.0.tar.gz (7.0 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for beancount_dkb-0.12.0-py3-none-any.whl