bw_hestia_bridge.hestia_api.cycle_graph ======================================= .. py:module:: bw_hestia_bridge.hestia_api.cycle_graph Functions --------- .. autoapisummary:: bw_hestia_bridge.hestia_api.cycle_graph.get_cycle_graph Module Contents --------------- .. py:function:: get_cycle_graph(cycle_id: str, staging: Optional[bool] = None) -> list[dict] Get all the cycles that are in the connected graph of `cycle_id`. :param cycle_id: Hestia ID of the initial cycle. :type cycle_id: str :param staging: Whether to use the staging API. :type staging: bool, optional (default: from configuration) :returns: **List of cycles of the form** -- :: [ { "from": {"@type": "Cycle", "@id": PARENT_CYCLE_ID}, "to": {"@type": "Cycle", "@id": CHILD_CYCLE_ID}, "via": {"@type": "Term", "@id": PRODUCT_TERM_ID} }, ... ] :rtype: list[dict] :raises ValueError: if `cycle_id` is not found