Skip to main content

abacus

pytest PyPI

A minimal yet valid double-entry accounting system in Python.

Documentation

See project documentation at https://epogrebnyak.github.io/abacus/.

Installation

pip install abacus-py

For latest version install from github:

pip install git+https://github.com/epogrebnyak/abacus.git

abacus-py requires Python 3.10 or higher.

Quick example

Let's do Sample Transaction #1 from accountingcoach.com1.

On December 1, 2022 Joe starts his business Direct Delivery, Inc. The first transaction that Joe will record for his company is his personal investment of $20,000 in exchange for 5,000 shares of Direct Delivery's common stock. Direct Delivery's accounting system will show an increase in its account Cash from zero to $20,000, and an increase in its stockholders' equity account Common Stock by $20,000.

Solution

Both Python code and command line script below will produce balance sheet after Sample Transaction #1 is completed.

Python code:

from abacus import Chart, Report

chart = Chart(assets=["cash"], capital=["common_stock"])
ledger = chart.ledger()
ledger.post(debit="cash", credit="common_stock", amount=20000, title="Owner's investment")
report = Report(chart, ledger)
print(report.balance_sheet)

Command line script:

bx init
bx post --entry asset:cash capital:common_stock 20000 --title "Initial investment"
bx report --balance-sheet

Result

Balance sheet
ASSETS  20000  CAPITAL              20000
  Cash  20000    Common stock       20000
                 Retained earnings      0
               LIABILITIES              0
TOTAL   20000  TOTAL                20000

See further transactions for this example at documentation website.

  1. It is a great learning resource for accounting, highly recommended. ↩

Metadata

Release files for abacus-py 0.8.8

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

Source distribution (sdist)

Source distribution for abacus-py 0.8.8
File Size Uploaded Provenance Actions
abacus_py-0.8.8.tar.gz 28.5 kB Without provenance Details for abacus_py-0.8.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for abacus-py 0.8.8
File Interpreter ABI Platform Actions
abacus_py-0.8.8-py3-none-any.whl Python 3 none any Details for abacus_py-0.8.8-py3-none-any.whl

Total release size: 60.3 kB

Release files / abacus_py-0.8.8.tar.gz

Download URL abacus_py-0.8.8.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a0361baf56c191044cdc5a52aed57f4368b86ba2d239b1c790567156d8b8c0c8
BLAKE2b-256 checksum
How to use checksums
448a7bf74aab66106b25d5f912d1dd45a5b5cbc3982f01718dad0efc246c460a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.8 Linux/6.2.0-1018-azure

Release files / abacus_py-0.8.8-py3-none-any.whl

Download URL abacus_py-0.8.8-py3-none-any.whl
Size 31.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
565400e9fedea9315f0f35003a97be344d674673be046e640bb797d50ac86cb2
BLAKE2b-256 checksum
How to use checksums
2e4038f9913499301c276709128c32c86ec003d24cc2914d46845d85aaf70e3b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.6.1 CPython/3.10.8 Linux/6.2.0-1018-azure

Security for abacus-py 0.8.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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