Beancount DKBApr 11, 2018 • #open-source , #personal-finance , #python
Last week I open-sourced
beancount-dkb, which is a Python package that
provides importer classes for converting CSV exports of DKB (Deutsche Kredit
Bank) account summaries into the Beancount format.
While searching, I stumbled upon the concept of Plain Text Accounting. The concept is simple - you maintain a list of all your transactions in a plain text file, which you are responsible for curating (hence no external access). This list of transactions follows the Double Entry Accounting method, and is written in a domain specific language (which may vary slightly from tool to tool).
This workflow is quite appealing. You download your account statements/summaries
from your bank's website, run them through a script to convert them to a format
that your tool of choice works with, and then run reporting on top. There are
multiple such tools available to adopt this flow, the most prominent ones being
beancount. I settled on using
because I like Python.
The only problem was that my account is with DKB, and there were no existing
conversion helpers to convert the CSV that I get from DKB to a format that
beancount can work with.
beancount defines how to ingest external transaction data. The idea
is to implement a class that sticks to the
interface provided by
beancount. The main job of this class is to take the raw
transactions data from your bank and output data in the beancount format.
This ingestion is extremely well documented. So I spent a weekend writing two
such importer classes -
ECImporter (which works with EC account summaries),
CreditImporter (which works on Credit Card account summaries). I've used
it to import my own transaction data starting from 2015 onwards, and the entire
setup works extremely well.
Anyway, the module is on PyPI under the name
beancount-dkb, and the source
is on Github. Hope it's useful!
🙏 Thanks for reading! Check out my ebook at https://personalfinancespython.com or follow me on Twitter @siddhantgoel.