Published: June 2022
In this book, you’ll build your personalized multi banking application powered entirely by Python. The Python ecosystem contains an excellent package called Beancount that provides data structures and command line utilities for working with money. This book will show you how to use Beancount to maintain double-entry accounting records of all your financial transactions in a plain-text file, and use the CLI/web tools Beancount provides to work with this ledger. The final result will be a Git repository on your computer where you can view and edit everything related to your money.
This book is intended only as an informative guide for those wishing to learn more about Python programming and personal financial transactions. In no way is this book intended to replace, countermand, or conflict with best bookkeeping practices, accounting standards, or financial regulations in your region or anywhere else.
This work was written and produced entirely by the author. We are proud to be distributing it.
Beancount is an excellent piece of software that provides a command line implementation of the double-entry accounting system. At its core, it gives you data structures for working with money, a language specification for defining financial transactions in a plain-text format, and CLI scripts that tie everything together.
A Beancount-driven workflow involves maintaining a ledger of all your financial transactions in a plain-text file and using CLI/GUi tools to interact with this ledger, analyze your past financial behavior, show your spending patterns, and much more. This book walks the reader through building such a workflow from scratch.
We start with introducing the reader to plain-text accounting and double-entry bookkeeping. In the next chapter, we talk about Beancount, the different tools that it provides its users, and what a Beancount-driven workflow looks like. Next, we help the reader build such a workflow for themselves. Using a lot of sample code, we help the reader set up a “finances” git repository on their disk and write code to convert transactions from their bank(s) into the Beancount file format. This chapter is quite heavy on code, which is why we follow up with writing tests for this code using pytest. The final chapter describes the CLI and GUI tools that the Beancount ecosystem gives the reader. All these tools help the reader generate various reports for their financial life, both on the console (using CLI tools) and in a graphical format (using a web application).
Published: June 2022