harp.config.configurables.service¶
- class LazyService[source]¶
Bases:
BaseConfigurableA lazy service definition, that will be resolved at runtime.
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.
- resolve(resolver, context)[source]¶
Resolve reference value in using the given resolver (callable) and resolution context.
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Service[source]¶
Bases:
BaseConfigurableA settings base class for service definitions.
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.
- to_service_definition(name, lifestyle='singleton')[source]¶
Convert the service settings to a service definition.
- Parameters:
- Return type:
- base: str | None¶
Base type for service definition. This is usually the base interface that the service implements, and you should use the type field to override the actually instanciated type.
- constructor: str | None¶
Constructor for service definition. If provided, will be used instead of the default constructor.
- model_config: ClassVar[ConfigDict] = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- iskeyword(object, /)¶
x.__contains__(y) <==> y in x.