Learn how to track your personal finances using Python, Beancount, Plaintext Accounting, and Double-Entry Bookkeeping.
500+ happy readers
"Tracking Personal Finances using Python is extremely thorough and well-researched. Siddhant's love of plaintext accounting shows through in the writing. Iām a regular beancount user, and his book still taught me new techniques for tracking my finances easily."
"A friend of mine told me about Siddhant's book while he was writing it. I was just getting into Beancount to help organize my finances, and the book was an invaluable guide. I highly recommend it - super useful!"
"I started using Beancount in Dec last year thanks to this book. I can now safely say that the book has paid for itself many times over. If you are interested in plain text accounting but don't know where to start, this is a great place to begin."
"I really liked the content and was able to sift through it and go from 0 to a working workflow with 3 sources and 3 months of data in 1 day."
"I've actually already finished your book, and the chapters on writing (AND TESTING!) custom providers are really helpful, so I'll be able to write my simplefin importer that I want to make."
"This was the only resource I could find that actually walks you through how to do that and provides sample code. I've never written a python program before, but the concepts were straightforward and I got a year's worth of financial transactions imported in a day thanks to the leg up this book gave me."
Tracking Personal Finances using Python is a book that teaches software developers how to manage their personal finances using Python and plain-text files.
The Python ecosystem contains an excellent package called Beancount that provides the foundations for working with money. We'll take Beancount as the starting point to build an application that serves as your single point of contact for your complete financial history, and:
The final result is a Git repository on your computer, acting as your own personal finance system.
The workflow that you will learn in the book prioritizes data privacy by using only open-source software and keeping your financial data entirely on your computer, making sure that it never touches the cloud.
Most personal finance apps are either closed-source or store data on external servers, creating privacy and security risks. In this book, we will show you a different approach.
You control your data at all times. All your financial information will be stored in plaintext files in a Git repository on your machine. Because the data never leaves your computer, there's no need for complex encryption. You control access completely.
Open source, fully auditable. All the tools we use (and show) are open-source, meaning it has already gone through considerable external review from other security researchers and developer. No hidden backdoors. No proprietary lock-in.
Imagine querying your bank transactions with SQL, automating transaction imports, and analyzing your spending patterns with Python scripts. That's the power of plaintext accounting combined with developer tools.
Built for your workflow. Manage your finances entirely from the terminal using your favorite editor. Store everything in a Git repository for version control, auditing, and easy backups. No GUI, no distractions. It's all plaintext files and code.
Beancount and Python. Learn how to use Beancount, the plaintext accounting engine, and Python for financial automation. Write custom scripts to categorize transactions, generate reports, and build financial dashboards. The possibilities are endless when your data is plaintext and code-queryable.
Query your finances. Run SQL queries on your transaction history to discover spending patterns, track income sources, and analyze your financial behavior. Extract insights at a level of flexibility that traditional finance apps simply can't provide.
Hey! My name is Siddhant, and I'm a software developer located in Munich, Germany. š©šŖ
I've been writing Python code for more than a decade now. In my spare time, I maintain several open-source packages written in Python, which have totaled more than 2 million downloads on the PyPI.
A few years ago I discovered the world of plain text accounting and Beancount. Since starting to track my personal finances using Beancount, I can honestly say that this is the one technology that has had an outsized impact on my life. I love sharing what I've learned and this book is another attempt at doing that.
I hope you enjoy it! If you have questions, feel free to reach out on Bluesky.