Skip to main content

Accounting System

1. Overview and Objectives

The goal of this system is to provide a robust personal finance tracking and reconciliation application. Users can track transactions across multiple accounts, import data from financial institutions, categorize expenses, and perform monthly (or periodic) reconciliations against bank statements. The design draws on double-entry accounting principles—ensuring data consistency, clarity of debits/credits, and the ability to generate meaningful financial reports.

Key Objectives

  1. Data Integrity
    • Use double-entry style transactions and splits.
    • Enforce referential integrity using foreign keys.
    • Prevent common data errors (e.g., mis-matched books for transaction vs. account).
  2. Easy Reconciliation
    • Mark transactions as cleared or reconciled within the system.
    • Provide a mechanism (triggers and foreign keys) to avoid mismatched or duplicated data.
  3. Flexibility and Extensibility
    • The schema uses UUID primary keys, making it easier to merge or migrate data.
    • The system can be adapted to different database backends (e.g., migrating from SQLite to PostgreSQL).
  4. Hierarchical Accounts
    • Support parent-child relationships among accounts (e.g., grouping categories under top-level accounts).
    • Allow organizing expense and income categories in a tree-like structure.
  5. Reporting
    • The schema supports queries and pivoting on accounts, transactions, and splits, essential for generating income/expense statements or custom reports.

2. Schema

3. System design

  • The application stores data in a SQLite Database identified by a DB URL provided as an argument.

4. Usage

usage: cli.py [-h] [--db-url DB_URL] {init-db,init-book,add-account,list-accounts,book-transaction} ...

Accounts CLI

positional arguments:
  {init-db,init-book,add-account,list-accounts,book-transaction}
    init-db             Initialize the DB schema (drop/create tables)
    init-book           Create a new Book if it doesn't exist
    add-account         Add an account to a given book
    list-accounts       List all accounts for a given book
    book-transaction    Create a transaction w/ two splits (debit & credit)

options:
  -h, --help            show this help message and exit
  --db-url, -u DB_URL   Database URL (default: sqlite:///db/accounting-system.db)

A. License

Copyright 2025 Edward Bridges

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for financial-accounts 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for financial-accounts 1.0.0
File Size Uploaded
financial_accounts-1.0.0.tar.gz 12.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for financial-accounts 1.0.0
File Interpreter ABI Platform
financial_accounts-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.4 kB

Release files / financial_accounts-1.0.0.tar.gz

Download URL financial_accounts-1.0.0.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ed06709545e0d89550de80755f08f5eac691e5df3b9952ae1ee8c0e4344c4f03
BLAKE2b-256 checksum
How to use checksums
6ad368af623298d49a9624fa23a1d8b9f047bcb3720e59f5c6cb22055a3dfae5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2025.

Transparency log

Release files / financial_accounts-1.0.0-py3-none-any.whl

Download URL financial_accounts-1.0.0-py3-none-any.whl
Size 15.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28cfbdb80357f6466e972703b1bb56b8f7ecb5c6f627341bae28474a6d58af81
BLAKE2b-256 checksum
How to use checksums
e5a4b306026e085a5b98146c51c968938b7dac9b7d353aa19d8408aef44ae5cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 4, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.0

2 release files

0.0.7

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page