Skip to content


Subversion checkout URL

You can clone with
Download ZIP
A double-entry bookkeeping system developed for use at
Python Makefile
Latest commit 911c4c4 @g-- g-- Merge pull request #16 from omarkhan/account-name-unique
Make account names unique within a bookset


SwingTix Bookkeeper

A double-entry bookkeeping system originally developed for SwingTix.

Hello, World

You'll need a django project. If you don't have one handy, you can make an empty one following the first steps of the django tutorial. Afterwards, edit <yourproject>/ to add "swingtix.bookkeeper" to INSTALLED_APPS and run:

$ python syncdb

Then you're ready to start exploring using the shell:

$ python shell

First, let's create a couple of accounts:

>>> from swingtix.bookkeeper.models import BookSet, Account

>>> book = BookSet(description="my book")

>>> revenue  = Account(bookset=book, name="revenue", positive_credit=True)
>>> bank     = Account(bookset=book, name="bank",    positive_credit=False)
>>> expense  = Account(bookset=book, name="expense", positive_credit=False)

Then you can use them:

>>> book = BookSet.objects.get(description="my book")
>>> revenue = book.get_account("revenue")
>>> bank    = book.get_account("bank")
>>> expense = book.get_account("expense")

#Someone pays you can advance.  Yay!
>>> bank.debit(120.00, revenue, "our first sale")
(<AccountEntry: 120 >, <AccountEntry: -120 >)

#but now you have to do some work.  The local coffee shop has free wifi..
>>>, expense, "coffee")
(<AccountEntry: -2 >, <AccountEntry: 2 >)

>>> bank.balance()
>>> expense.balance()
>>> revenue.balance()
Something went wrong with that request. Please try again.