qilisdk.yaml

Attributes

yaml

Classes

QiliYAML

Custom YAML handler for QiliSDK.

Functions

csr_representer(representer, data)

Representer for CSR matrix.

csr_constructor(constructor, node)

Constructor for CSR matrix.

ndarray_representer(representer, data)

Representer for ndarray.

ndarray_constructor(constructor, node)

Constructor for ndarray.

np_scalar_representer(representer, data)

Represent any NumPy scalar (e.g. np.int64, np.float32).

np_scalar_constructor(constructor, node)

Reconstruct a NumPy scalar.

defaultdict_representer(representer, data)

Represent a defaultdict by serializing its default_factory

defaultdict_constructor(constructor, node)

Reconstruct a defaultdict, restoring its factory and contents.

function_representer(representer, data)

Represent a non-lambda function by serializing it.

function_constructor(constructor, node)

Reconstruct a function from the serialized data.

lambda_representer(representer, data)

Represent a lambda function by serializing its code.

lambda_constructor(constructor, node)

Reconstruct a lambda function from the serialized data.

pydantic_model_representer(representer, data)

Representer for Pydantic Models.

pydantic_model_constructor(constructor, node)

Constructor for Pydantic Models.

complex_representer(representer, data)

Representer for built-in Python complex numbers.

complex_constructor(constructor, node)

Constructor for built-in Python complex numbers.

tuple_representer(representer, data)

Representer for built-in Python tuple.

tuple_constructor(constructor, node)

Constructor for built-in Python tuple.

type_representer(representer, data)

Represent any Python class/type by its import path.

type_constructor(constructor, node)

Reconstruct a class/type from its import path.

deque_representer(representer, data)

Representer for deque

deque_constructor(constructor, node)

Constructor for ndarray

Module Contents

csr_representer(representer, data: scipy.sparse.csr_matrix)[source]

Representer for CSR matrix.

csr_constructor(constructor, node)[source]

Constructor for CSR matrix.

ndarray_representer(representer, data)[source]

Representer for ndarray.

ndarray_constructor(constructor, node)[source]

Constructor for ndarray.

np_scalar_representer(representer, data: numpy.generic)[source]

Represent any NumPy scalar (e.g. np.int64, np.float32).

np_scalar_constructor(constructor, node)[source]

Reconstruct a NumPy scalar.

defaultdict_representer(representer, data: collections.defaultdict)[source]

Represent a defaultdict by serializing its default_factory (as module+qualname) plus its items dict.

defaultdict_constructor(constructor, node)[source]

Reconstruct a defaultdict, restoring its factory and contents.

function_representer(representer, data)[source]

Represent a non-lambda function by serializing it.

function_constructor(constructor, node)[source]

Reconstruct a function from the serialized data.

lambda_representer(representer, data)[source]

Represent a lambda function by serializing its code.

lambda_constructor(constructor, node)[source]

Reconstruct a lambda function from the serialized data.

pydantic_model_representer(representer, data)[source]

Representer for Pydantic Models.

pydantic_model_constructor(constructor, node)[source]

Constructor for Pydantic Models.

complex_representer(representer, data: complex)[source]

Representer for built-in Python complex numbers.

complex_constructor(constructor, node)[source]

Constructor for built-in Python complex numbers.

tuple_representer(representer, data: tuple)[source]

Representer for built-in Python tuple.

tuple_constructor(constructor, node)[source]

Constructor for built-in Python tuple.

type_representer(representer, data: type)[source]

Represent any Python class/type by its import path. E.g. datetime.datetime → ‘datetime.datetime’

type_constructor(constructor, node)[source]

Reconstruct a class/type from its import path.

deque_representer(representer, data)[source]

Representer for deque

deque_constructor(constructor, node)[source]

Constructor for ndarray

class QiliYAML(**kwargs: list[str] | str | None)[source]

Bases: ruamel.yaml.YAML

Custom YAML handler for QiliSDK.

Initialize the YAML handler with custom settings.

register_class(cls=None, *, shared: bool = False)[source]

Register a class with the YAML handler, assigning it a unique tag.

yaml[source]