Catalog PyPI
Back to packageRELEASE DETAILS

0.8.8

PyPI

abacus-py

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

Published14 Jan 2024
Direct dependencies3
Transitive dependenciesNot calculated

README

Version 0.8.8 documentation

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.

Footnotes

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

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 3

Native requirements
3 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
rich
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8,<4.0",
  "evaluation": "NOT_EVALUATED"
}
rich (>=13.3.5,<14.0.0)runtime
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8,<4.0",
  "evaluation": "NOT_EVALUATED"
}
pydantic (>=1.10.8,<2.0.0)runtime
typer
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.8,<4.0",
  "evaluation": "NOT_EVALUATED"
}
typer (>=0.9.0,<0.10.0)runtime

Distribution files

2 collected
abacus_py-0.8.8-py3-none-any.whl

bdist_wheel · 31.08 KB · Python py3

Source file
abacus_py-0.8.8.tar.gz

sdist · 27.84 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:08 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:bd73282201d19d4c284141043ea6e56ce59ec2059a11e8e4e6b88ecfb187ec63

Other collected versions

View all collected versions →