summaryrefslogtreecommitdiff
path: root/plugins/warp/api/python/warp.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/warp/api/python/warp.py')
-rw-r--r--plugins/warp/api/python/warp.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/warp/api/python/warp.py b/plugins/warp/api/python/warp.py
index 866d179b..fc487a4d 100644
--- a/plugins/warp/api/python/warp.py
+++ b/plugins/warp/api/python/warp.py
@@ -350,6 +350,13 @@ class WarpContainer(metaclass=_WarpContainerMetaclass):
warpcore.BNWARPFreeContainerList(containers, count.value)
return result
+ @staticmethod
+ def by_name(name: str) -> Optional['WarpContainer']:
+ for container in WarpContainer:
+ if container.name == name:
+ return container
+ return None
+
@property
def name(self) -> str:
return warpcore.BNWARPContainerGetName(self.handle)