diff --git a/apis/python/node/dora/__init__.pyi b/apis/python/node/dora/__init__.pyi index e74b2a967..b083d4f94 100644 --- a/apis/python/node/dora/__init__.pyi +++ b/apis/python/node/dora/__init__.pyi @@ -39,6 +39,9 @@ node = Node() This method returns the parsed dataflow YAML file.""" + def dataflow_id(self) -> str: + """Returns the dataflow id.""" + def merge_external_events(self, subscription: dora.Ros2Subscription) -> None: """Merge an external event stream with dora main loop. This currently only work with ROS2.""" diff --git a/apis/python/node/src/lib.rs b/apis/python/node/src/lib.rs index f6f47ed99..95fd29c7a 100644 --- a/apis/python/node/src/lib.rs +++ b/apis/python/node/src/lib.rs @@ -154,6 +154,13 @@ impl Node { pythonize::pythonize(py, self.node.dataflow_descriptor()) } + /// Returns the dataflow id. + /// + /// :rtype: str + pub fn dataflow_id(&self) -> String { + self.node.dataflow_id().to_string() + } + /// Merge an external event stream with dora main loop. /// This currently only work with ROS2. ///