From 017349bdbe171c66974a5835f2f74f76138386ea Mon Sep 17 00:00:00 2001 From: Mason Reed <35282038+emesare@users.noreply.github.com> Date: Sun, 22 Feb 2026 20:40:28 -0800 Subject: [WARP] Allow containers to be constructed programmatically (#7952) --- plugins/warp/api/python/warp.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/warp/api/python') 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 @@ -350,6 +350,13 @@ class WarpContainer(metaclass=_WarpContainerMetaclass): warpcore.BNWARPFreeContainerList(containers, count.value) 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: -- cgit v1.3.1