summaryrefslogtreecommitdiff
path: root/plugins/warp/api/python
diff options
context:
space:
mode:
authorMason Reed <35282038+emesare@users.noreply.github.com>2026-02-22 20:40:28 -0800
committerGitHub <noreply@github.com>2026-02-22 20:40:28 -0800
commit017349bdbe171c66974a5835f2f74f76138386ea (patch)
tree2e81f92e683f4b1d12c129360c788e0e52217d82 /plugins/warp/api/python
parente2e420c91147f2a83cf59b37c973f57e209ef67a (diff)
[WARP] Allow containers to be constructed programmatically (#7952)
Diffstat (limited to 'plugins/warp/api/python')
-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 fc487a4d..a699ebbc 100644
--- a/plugins/warp/api/python/warp.py
+++ b/plugins/warp/api/python/warp.py
@@ -351,6 +351,13 @@ class WarpContainer(metaclass=_WarpContainerMetaclass):
return result
@staticmethod
+ def add(name: str) -> 'WarpContainer':
+ container = warpcore.BNWARPAddContainer(name)
+ if container is None:
+ raise ValueError(f"Failed to add container: {name}")
+ return WarpContainer(container)
+
+ @staticmethod
def by_name(name: str) -> Optional['WarpContainer']:
for container in WarpContainer:
if container.name == name: