harp.config.configurables.stateful

Inheritance diagram of harp.config.configurables.stateful

class Stateful[source]

Bases: BaseConfigurable, Generic[TSettings]

A base class for stateful objects that are related to a settings class. Usually, it’s used for live status of settings-defined objects, that may vary over time. It allows to separate the concerns of the imuatable, environment-provided settings, and the mutable, runtime-related state of the object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod from_settings_dict(data)[source]
Parameters:

data (dict)

Return type:

Self

classmethod from_settings_kwargs(**kwargs)[source]
Return type:

Self

classmethod get_settings_type()[source]
Return type:

Type[Configurable]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

settings: Annotated[TSettings, FieldInfo(annotation=NoneType, required=True, repr=False)]
class Stateful[source]

Bases: BaseConfigurable, Generic[TSettings]

A base class for stateful objects that are related to a settings class. Usually, it’s used for live status of settings-defined objects, that may vary over time. It allows to separate the concerns of the imuatable, environment-provided settings, and the mutable, runtime-related state of the object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod from_settings_dict(data)[source]
Parameters:

data (dict)

Return type:

Self

classmethod from_settings_kwargs(**kwargs)[source]
Return type:

Self

classmethod get_settings_type()[source]
Return type:

Type[Configurable]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

settings: Annotated[TSettings, FieldInfo(annotation=NoneType, required=True, repr=False)]
class Stateful[source]

Bases: BaseConfigurable, Generic[TSettings]

A base class for stateful objects that are related to a settings class. Usually, it’s used for live status of settings-defined objects, that may vary over time. It allows to separate the concerns of the imuatable, environment-provided settings, and the mutable, runtime-related state of the object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod from_settings_dict(data)[source]
Parameters:

data (dict)

Return type:

Self

classmethod from_settings_kwargs(**kwargs)[source]
Return type:

Self

classmethod get_settings_type()[source]
Return type:

Type[Configurable]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

settings: Annotated[TSettings, FieldInfo(annotation=NoneType, required=True, repr=False)]
class Stateful[source]

Bases: BaseConfigurable, Generic[TSettings]

A base class for stateful objects that are related to a settings class. Usually, it’s used for live status of settings-defined objects, that may vary over time. It allows to separate the concerns of the imuatable, environment-provided settings, and the mutable, runtime-related state of the object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod from_settings_dict(data)[source]
Parameters:

data (dict)

Return type:

Self

classmethod from_settings_kwargs(**kwargs)[source]
Return type:

Self

classmethod get_settings_type()[source]
Return type:

Type[Configurable]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

settings: Annotated[TSettings, FieldInfo(annotation=NoneType, required=True, repr=False)]
class Stateful[source]

Bases: BaseConfigurable, Generic[TSettings]

A base class for stateful objects that are related to a settings class. Usually, it’s used for live status of settings-defined objects, that may vary over time. It allows to separate the concerns of the imuatable, environment-provided settings, and the mutable, runtime-related state of the object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod from_settings_dict(data)[source]
Parameters:

data (dict)

Return type:

Self

classmethod from_settings_kwargs(**kwargs)[source]
Return type:

Self

classmethod get_settings_type()[source]
Return type:

Type[Configurable]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

settings: Annotated[TSettings, FieldInfo(annotation=NoneType, required=True, repr=False)]
class Stateful[source]

Bases: BaseConfigurable, Generic[TSettings]

A base class for stateful objects that are related to a settings class. Usually, it’s used for live status of settings-defined objects, that may vary over time. It allows to separate the concerns of the imuatable, environment-provided settings, and the mutable, runtime-related state of the object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod from_settings_dict(data)[source]
Parameters:

data (dict)

Return type:

Self

classmethod from_settings_kwargs(**kwargs)[source]
Return type:

Self

classmethod get_settings_type()[source]
Return type:

Type[Configurable]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

settings: Annotated[TSettings, FieldInfo(annotation=NoneType, required=True, repr=False)]
class Stateful[source]

Bases: BaseConfigurable, Generic[TSettings]

A base class for stateful objects that are related to a settings class. Usually, it’s used for live status of settings-defined objects, that may vary over time. It allows to separate the concerns of the imuatable, environment-provided settings, and the mutable, runtime-related state of the object.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

classmethod from_settings_dict(data)[source]
Parameters:

data (dict)

Return type:

Self

classmethod from_settings_kwargs(**kwargs)[source]
Return type:

Self

classmethod get_settings_type()[source]
Return type:

Type[Configurable]

model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'settings': FieldInfo(annotation=TypeVar, required=True, repr=False)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

settings: Annotated[TSettings, FieldInfo(annotation=NoneType, required=True, repr=False)]