fava.ext.portfolio_list#

Portfolio list extension for Fava.

This is a simple example of Fava’s extension reports system.

class fava.ext.portfolio_list.Portfolio(title, rows, types=(('account', <class 'str'>), ('balance', <class 'decimal.Decimal'>), ('allocation', <class 'decimal.Decimal'>)))#

A portfolio.

rows: list[Row]#
title: str#
types: tuple[tuple[str, type[Any]], ...] = (('account', <class 'str'>), ('balance', <class 'decimal.Decimal'>), ('allocation', <class 'decimal.Decimal'>))#
class fava.ext.portfolio_list.PortfolioList(ledger, config=None)#

Sample Extension Report that just prints out an Portfolio List.

has_js_module: bool = True#

Whether this extension includes a Javascript module.

portfolio_accounts(filter_str=None)#

Get an account tree based on matching regex patterns.

Return type:

list[Portfolio]

report_title: str | None = 'Portfolio List'#

Name for a HTML report for this extension.

class fava.ext.portfolio_list.Row(account: str, balance: Decimal | None, allocation: Decimal | None)#

A row in the portfolio tables.