It's all in the documentation <https://beancount.github.io/docs/api_reference/beancount.core.html>. More specifically, balance realization is here <https://beancount.github.io/docs/api_reference/beancount.core.html#beancount.core.realization> .
However, accomplishing what you're wanting to do is easily done by writing BQL + python. The bean-query shell works well for basic queries. For advanced manipulation, a typical recipe is to get the output of a basic query from a BQL statement in python, and then processing the results to your heart's content. Here is an example <https://github.com/redstreet/fava_investor/blob/main/fava_investor/modules/minimizegains/libminimizegains.py> . On Thursday, June 29, 2023 at 9:57:08 PM UTC-7 Olivier Crémel wrote: > I'd like to write some simple reports, for instance "net income", defined > as income minus a set of non-discretionary expenses (like taxes). > > So I looked up the doc and it states, more or less: > > You call the beancount.loader.load_file() loader function, you get the > list of "entries" and you can process the entries as you like. > > And that's it. > > But, surely, I'm not expected to re-implement balance computing by going > through all the entries, so I assume there is another API that takes > "entries" and gives me back balances. > > Where do I find a list of such canonical external APIs ? > > Thanks. > > > > > > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/5727b3ad-f1ea-453f-949e-4b28a73943fdn%40googlegroups.com.
