finalynx.fetch.source_base_line

Module Contents

Classes

SourceBaseLine

API

class finalynx.fetch.source_base_line.SourceBaseLine(name: str, cache_validity: int = 12)[source]

Bases: finalynx.fetch.source_base.SourceBase

fetch(portfolio: finalynx.portfolio.Portfolio, clear_cache: bool, ignore_orphans: bool) rich.tree.Tree[source]

Fetch data online from a source that contains investment Line objects.

Parameters:
  • clear_cache – Delete cached data to immediately fetch data online, defaults to False

  • ignore_orphans – If a line in your account is not referenced in your Portfolio instance then don’t attach it to the root (used as a reminder), defaults to False

Returns:

A Tree object from the rich package used to display what has been fetched.

_register_fetchline(tree_node: rich.tree.Tree, name: str, id: str, account: str, amount: int, currency: str, custom: Optional[Dict[str, Any]] = None) None[source]

Internal method used to register a new investment found from the source.