nat.data_models.function#
Attributes#
Classes#
Base configuration for functions. |
|
Base configuration for function groups. |
|
Base configuration for functions. |
Module Contents#
- class FunctionBaseConfig(/, **data: Any)#
Bases:
nat.data_models.common.TypedBaseModel,nat.data_models.common.BaseModelRegistryTagBase configuration for functions.
- Attributes:
name: Optional display name for this function. Used in tracing and observability.If not provided, the function type will be used.
middleware: List of function middleware names to apply to this function.These must match names defined in the
middlewaresection of the YAML configuration.
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.selfis explicitly positional-only to allowselfas a field name.
- class FunctionGroupBaseConfig(/, **data: Any)#
Bases:
nat.data_models.common.TypedBaseModel,nat.data_models.common.BaseModelRegistryTagBase configuration for function groups.
Function groups enable sharing of configurations and resources across multiple functions.
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.selfis explicitly positional-only to allowselfas a field name.- _validate_include_exclude()#
- class EmptyFunctionConfig(/, **data: Any)#
Bases:
FunctionBaseConfigBase configuration for functions.
- Attributes:
name: Optional display name for this function. Used in tracing and observability.If not provided, the function type will be used.
middleware: List of function middleware names to apply to this function.These must match names defined in the
middlewaresection of the YAML configuration.
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.selfis explicitly positional-only to allowselfas a field name.
- FunctionConfigT#
- FunctionGroupConfigT#