Base
Base functionality for Components integration.
EvaluateContainerWithVariables
Evaluate container with variables.
This class provides functionality to manage evaluators with variables.
__init__
Initialize the evaluate container with variables.
Arguments:
Name | Type | Description |
---|---|---|
id | str | The ID of the evaluate container. |
entity | Entity | The entity of the evaluate container. |
log_writer | LogWriter | The log writer of the evaluate container. |
for_evaluators | List[str] | The evaluators of the evaluate container. |
with_variables
With variables.
Arguments:
Name | Type | Description |
---|---|---|
variables | Dict[str, str] | The variables to use for the evaluate container. |
EvaluateContainer
Evaluate container.
This class provides functionality to manage evaluators for a specific entity.
Attributes:
Name | Type | Description |
---|---|---|
entity | Entity | The entity associated with these evaluators. |
writer | LogWriter | The log writer used for committing evaluator actions. |
evaluators | List[str] | A list of evaluator identifiers. |
id | str | A unique identifier for this set of evaluators. |
Methods:
with_variables
- Allows adding variables to be used by the evaluators.
__init__
Initialize the evaluate container.
Arguments:
Name | Type | Description |
---|---|---|
id | str | The ID of the evaluate container. |
entity | Entity | The entity of the evaluate container. |
log_writer | LogWriter | The log writer of the evaluate container. |
with_variables
With variables.
Arguments:
Name | Type | Description |
---|---|---|
variables | Dict[str, str] | The variables to use for the evaluate container. |
for_evaluators | List[str] | The evaluators of the evaluate container. |
with_evaluators
With evaluators.
Arguments:
Name | Type | Description |
---|---|---|
*evaluators | str | The evaluators to use for the evaluate container. |
Returns:
Name | Description |
---|---|
[EvaluateContainerWithVariables](/sdk/python/references/logger/components/base) | The evaluate container with variables. |
BaseContainer
Base container.
This class provides functionality to manage containers for a specific entity.
__init__
Initialize the base container.
Arguments:
Name | Type | Description |
---|---|---|
entity | Entity | The entity of the base container. |
config | BaseConfig | The config of the base container. |
writer | LogWriter | The writer of the base container. |
id
Get the ID of the base container.
Returns:
Name | Description |
---|---|
str | The ID of the base container. |
evaluate
Evaluate the base container.
Returns:
Name | Description |
---|---|
[EvaluateContainer](/sdk/python/references/logger/components/base) | The evaluate container. |
_evaluate_
Evaluate the base container.
Arguments:
Name | Type | Description |
---|---|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
add_metadata
Add metadata to the base container.
Arguments:
Name | Type | Description |
---|---|---|
metadata | Dict[str, Any] | The metadata to add to the base container. |
add_metadata_
Add metadata to the base container.
Arguments:
Name | Type | Description |
---|---|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
metadata | Dict[str, Any] | The metadata to add to the base container. |
add_tag
Add a tag to the base container.
Arguments:
Name | Type | Description |
---|---|---|
key | str | The key of the tag. |
value | str | The value of the tag. |
_add_tag_
Add a tag to the base container.
Arguments:
Name | Type | Description |
---|---|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
key | str | The key of the tag. |
value | str | The value of the tag. |
end
End the base container.
This method is used to end the base container.
_end_
End the base container.
Arguments:
Name | Type | Description |
---|---|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
data | Optional[Dict[str, Any]] | The data to add to the base container. |
data
Get the data of the base container.
Returns:
Dict[str, Any]: The data of the base container.
_commit_
Commit the base container.
Arguments:
Name | Type | Description |
---|---|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
id | str | The ID of the base container. |
action | str | The action to commit. |
data | Optional[Dict[str, Any]] | The data to commit. |
EventEmittingBaseContainer
_event_
Add an event to the base container.
Arguments:
Name | Type | Description |
---|---|---|
writer | LogWriter | The writer of the base container. |
entity | Entity | The entity of the base container. |
entity_id | str | The ID of the entity. |
id | str | The ID of the event. |
name | str | The name of the event. |
tags | Optional[Dict[str, str]] | The tags of the event. |
metadata | Optional[Dict[str, Any]] | The metadata of the event. |
event
Add an event to the base container.
Arguments:
Name | Type | Description |
---|---|---|
id | str | The ID of the event. |
name | str | The name of the event. |
tags | Optional[Dict[str, str]] | The tags of the event. |
metadata | Optional[Dict[str, Any]] | The metadata of the event. |