Skip to main content

Double entry book keeping in Django

Project description

Double entry book keeping in Django.

The initial priority is to ensure the model layer works reliably. Ultimately the intention is to integrate this with swiftwind to provide an accounting & billing system for a communal household. This interface should be intuitive and suitable for non-experts.


Installation using pip:

pip install django-hordak  # Release coming soon

Tested against:

  • Django >= 1.8, <= 1.10

  • Python 2.7, 3.4, 3.5, nightly

  • Postgres 9

Hordak may work with Postgres 8, but this is not tested for.

It may also be possible to run Hordak on a non-Postgres RDBMS if one skips the *_check_* migrations, as these are Postgres-specific. However, this is not recommended as it could lead to database inconsistency.


The core models consist of:

  • Account - Such as ‘Accounts Receivable’, a bank account, etc. Accounts can be arranged as a tree structure, where the balance of the parent account is the summation of the balances of all its children.

  • Transaction - Represents a movement between accounts. Each transaction must have two or more legs.

  • Leg - Represents a flow of money into (debit) or out of (credit) a transaction. Debits are represented by negative amounts, and credits by positive amounts. The sum of all a transaction’s legs must equal zero. This is enforced with a database constraint.

Additionally, there are models which related to the import of external bank statement data:

  • StatementImport - Represents a simple import of zero or more statement lines relating to a specific Account.

  • StatementLine - Represents a statement line. StatementLine.create_transaction() may be called to create a transaction for the statement line.

Loading Fixtures

Fixture data can be loaded as normal:

./ loaddata top-level-accounts

Creating Fixtures

Create fixtures as follows:

./ dumpdata hordak --indent=2 --natural-primary --natural-foreign > fixtures/my-fixture.json



django-hordak is packaged using seed.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-hordak-1.0.0.tar.gz (16.8 kB view hashes)

Uploaded Source

Built Distribution

django_hordak-1.0.0-py3-none-any.whl (21.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page