Skip to content

BaseConfig

BaseConfig dataclass

BaseConfig()

Methods:

  • deserialize

    Create an instance from a JSON string or dictionary.

  • serialize

    Convert the configuration into a serializable dictionary.

  • stringify_class

    Return a JSON-friendly representation of a value.

deserialize classmethod

deserialize(data: Union[str, Dict[str, Any]]) -> BaseStudioConfig

Create an instance from a JSON string or dictionary.

Parameters:

  • data

    (Union[str, Dict[str, Any]]) –

    JSON string or already parsed dictionary.

Returns:

serialize

serialize() -> Dict[str, Any]

Convert the configuration into a serializable dictionary.

Returns:

  • dict ( Dict[str, Any] ) –

    Serialized representation of the configuration.

stringify_class classmethod

stringify_class(value: Any) -> Any

Return a JSON-friendly representation of a value.

Parameters:

  • value

    (Any) –

    Object to convert.

Returns:

  • Any

    A value that can be serialized by :mod:json.