qblox_scheduler.structure#
Validated and serializable data structures using pydantic.
In this module we provide pre-configured Pydantic model and
custom field types that allow serialization of typical data objects
that we frequently use in qblox-scheduler, like functions and arrays.
Submodules#
Attributes#
Classes#
A parent for all data structures. |
|
Pydantic-compatible version of |
Package Contents#
- class DataStructure(/, **data: Any)[source]#
Bases:
_SerializableBaseModelA parent for all data structures.
Data attributes are generated from the class’ type annotations, similarly to dataclasses. If data attributes are JSON-serializable, data structure can be serialized using
json()method. This string can be deserialized usingparse_raw()classmethod of a correspondent child class.If required, data fields can be validated, see examples for more information. It is also possible to define custom field types with advanced validation.
This class is a pre-configured pydantic model. See its documentation for details of usage information.
Examples
- model_config#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class Graph(incoming_graph_data=None, **attr)[source]#
Bases:
networkx.GraphPydantic-compatible version of
networkx.Graph.