itacart.serialization.data_tree_blob.data_tree_schema
- itacart.serialization.data_tree_blob.data_tree_schema(blob)[source]
What a DataTreeBlob declares, read from its frame.
- Parameters:
blob (
Union[bytes,bytearray,memoryview]) – The bytes.- Return type:
- Returns:
resolution(the observation resolution),deepest(the finest level holding nodes),pruned(whether the writer folded families into blocks),variables(a tuple ofDataVariable) andnodes(the node count per level).- Raises:
MalformedBlobError – If the frame is malformed.
IncompatibleProfileError – If the version is not one this build reads.
Example
>>> n = DataVariable("n", "u32", op="sum", leaf_max=1) >>> blob = encode_data_tree({"NE(0625/0451(3))": {"n": 1}}, [n]) >>> data_tree_schema(blob)["nodes"] (1, 1, 1)