Component

class app.components.component.component.Component[source]

Bases: ComponentMeta, Generic

Inheritance diagram of Component

Inheritance Diagram for Component

Methods

__init__(config, *args, **kwargs)

component_entrypoint_decorator(entrypoint)

get_current()

Get the current component being executed in an entrypoint, if any.

Attributes

context

context_or_none

decimal

inside_entrypoint

Returns True if the component is currently inside an entrypoint method.

portfolio

config

__init__(config: C, *args, **kwargs) None[source]
Parameters:

config (C)

Return type:

None

classmethod component_entrypoint_decorator(entrypoint: Entrypoint[__annotationlib_name_1__, __annotationlib_name_2__, __annotationlib_name_3__]) Entrypoint[__annotationlib_name_4__, __annotationlib_name_5__, __annotationlib_name_6__][source]
Parameters:

entrypoint (Entrypoint[__annotationlib_name_1__, __annotationlib_name_2__, __annotationlib_name_3__])

Return type:

Entrypoint[__annotationlib_name_4__, __annotationlib_name_5__, __annotationlib_name_6__]

config_class

alias of ComponentConfig

property context: Context
property context_or_none: Context | None
property decimal: DecimalFactory
static get_current() Component | None[source]

Get the current component being executed in an entrypoint, if any.

Return type:

Component | None

property inside_entrypoint: bool

Returns True if the component is currently inside an entrypoint method.

This is used to prevent recursive calls to entrypoint methods.

property portfolio: PortfolioProtocol