nemo_microservices.data_designer.config.base#

Module Contents#

Classes#

API#

class nemo_microservices.data_designer.config.base.ConfigBase(/, **data: typing.Any)#

Bases: pydantic.BaseModel

model_config#

‘ConfigDict(…)’

class nemo_microservices.data_designer.config.base.ExportableConfigBase(/, **data: typing.Any)#

Bases: nemo_microservices.data_designer.config.base.ConfigBase

to_dict() dict[str, Any]#

Convert the configuration to a dictionary.

Returns: A dictionary representation of the configuration using JSON-compatible serialization.

to_json(
path: Optional[Union[str, pathlib.Path]] = None,
*,
indent: Optional[int] = 2,
**kwargs,
) Optional[str]#

Convert the configuration to a JSON string or file.

Args: path: Optional file path to write the JSON to. If None, returns the JSON string instead of writing to file. indent: Number of spaces for JSON indentation. Defaults to 2. **kwargs: Additional keyword arguments passed to json.dumps().

Returns: The JSON string if path is None, otherwise None (file is written).

to_yaml(
path: Optional[Union[str, pathlib.Path]] = None,
*,
indent: Optional[int] = 2,
**kwargs,
) Optional[str]#

Convert the configuration to a YAML string or file.

Args: path: Optional file path to write the YAML to. If None, returns the YAML string instead of writing to file. indent: Number of spaces for YAML indentation. Defaults to 2. **kwargs: Additional keyword arguments passed to yaml.dump().

Returns: The YAML string if path is None, otherwise None (file is written).