finalynx.fetch.fetch_line

This file defines elements used to match Line instances defined in the main portfolio tree with investments fetched online (e.g. from your Finary account).

Module Contents

Classes

FetchAttribs

Abstract class that defines common attributes used to match Keys (defined in the portfolio) with FetchLines (created by fetch agents, e.g. FinaryFetch).

FetchLine

Represents each investment found in your online accounts (e.g. Finary). The instance is populated with information found online about this line. FetchLines will then be matched to Keys defined in the portfolio to populate β€˜real’ Line instances with FetchLine information.

API

class finalynx.fetch.fetch_line.FetchAttribs[source]

Abstract class that defines common attributes used to match Keys (defined in the portfolio) with FetchLines (created by fetch agents, e.g. FinaryFetch).

name: Optional[str]

None

id: Optional[str]

None

account: Optional[str]

None

custom: Optional[Dict[str, Any]]

None

__post_init__() None[source]

Runs after an instance is created to validate inputs. At least one field must be set.

to_dict() Dict[str, Any][source]
abstract static from_dict(dict: Dict[str, Any]) finalynx.fetch.fetch_line.FetchAttribs[source]
class finalynx.fetch.fetch_line.FetchLine[source]

Bases: finalynx.fetch.fetch_line.FetchAttribs

Represents each investment found in your online accounts (e.g. Finary). The instance is populated with information found online about this line. FetchLines will then be matched to Keys defined in the portfolio to populate β€˜real’ Line instances with FetchLine information.

amount: float

0

currency: Optional[str]

None

matches_line(line: finalynx.portfolio.line.Line) bool[source]
update_line(line: finalynx.portfolio.line.Line) None[source]

Update a Line instance, usually matched against a FetchKe, in the portfolio, with data fetched online.

generate_line() finalynx.portfolio.line.Line[source]

Generate a basic Line instance from this abstract fetched line. Used when filling folders based on account filters.

to_dict() Dict[str, Any][source]
static from_dict(dict: Dict[str, Any]) finalynx.fetch.fetch_line.FetchLine[source]