bsfs.graph.result module#

bsfs.graph.result.to_dict_view(triples, one_node: bool, one_path: bool, unique_paths: Set[URI | Iterable[URI]], node: bool, path: bool, value: bool, default: Any | None = None) Any#

Return a dict of results.

Note that triples are materialized to create this view.

The returned structure depends on the node, path, and value flags. If all flags are set to False, returns a dict(node -> dict(path -> set(values))). Setting a flag to true omits or simplifies the respective component (if possible).

bsfs.graph.result.to_list_view(triples, node: bool, path: bool, value: bool)#

Return an iterator over results.

Dependent on the node, path, and value flags, the respective component is omitted.