Ledger is, at heart, just a sophisticated calculator.  In addition to summing values within “accounts”, it guarantees that every transaction balances to zero to confirm these values are correctly transferred between accounts.

In addition to using this calculator from the command-line to generate reports, you may also access it from the Python scripting language, in order to manipulate the figures however you wish.  The following chapter presents the ideas you will need to know to accomplish this, as well as many typical idioms used by the Ledger module.