swarmauri_toolkit_containertoolkit 0.8.0.dev52__py3-none-any.whl → 0.11.0.dev4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- swarmauri_toolkit_containertoolkit/ContainerToolkit.py +52 -4
- {swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info → swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info}/METADATA +28 -18
- swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info/RECORD +7 -0
- {swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info → swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info}/WHEEL +1 -1
- swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info/RECORD +0 -7
- {swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info → swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info}/entry_points.txt +0 -0
- {swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info → swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
from typing import Dict
|
|
1
|
+
from typing import Dict, Literal
|
|
2
|
+
|
|
3
|
+
from pydantic import Field
|
|
4
|
+
|
|
5
|
+
from swarmauri_core.processes import IProcessBackend
|
|
6
|
+
from swarmauri_process_docker import DockerProcessBackend
|
|
7
|
+
from swarmauri_process_kubernetes import KubernetesProcessBackend
|
|
8
|
+
from swarmauri_tool_runcommand import RunCommandTool
|
|
9
|
+
from swarmauri_tool_runbashscript import RunBashScriptTool
|
|
10
|
+
from swarmauri_tool_readprocessoutput import ReadProcessOutputTool
|
|
11
|
+
from swarmauri_tool_writestdin import WriteStdinTool
|
|
12
|
+
from swarmauri_tool_cancelprocess import CancelProcessTool
|
|
2
13
|
from swarmauri_base.tools.ToolBase import ToolBase
|
|
3
14
|
from swarmauri_base.toolkits.ToolkitBase import ToolkitBase
|
|
4
15
|
from swarmauri_base.ComponentBase import ComponentBase, SubclassUnion
|
|
@@ -10,21 +21,58 @@ from swarmauri_tool_containermakepr import ContainerMakePrTool
|
|
|
10
21
|
|
|
11
22
|
@ComponentBase.register_type(ToolkitBase, "ContainerToolkit")
|
|
12
23
|
class ContainerToolkit(ToolkitBase):
|
|
13
|
-
tools: Dict[str, SubclassUnion[ToolBase]] =
|
|
24
|
+
tools: Dict[str, SubclassUnion[ToolBase]] = Field(
|
|
25
|
+
default_factory=dict, exclude=True
|
|
26
|
+
)
|
|
27
|
+
container_name: str | None = None
|
|
28
|
+
image: str | None = None
|
|
29
|
+
driver: Literal["docker", "kubernetes"] = "docker"
|
|
14
30
|
|
|
15
31
|
def __init__(
|
|
16
|
-
self,
|
|
32
|
+
self,
|
|
33
|
+
container_name: str | None = None,
|
|
34
|
+
image: str | None = None,
|
|
35
|
+
driver: Literal["docker", "kubernetes"] = "docker",
|
|
36
|
+
backend: IProcessBackend | None = None,
|
|
37
|
+
**kwargs,
|
|
17
38
|
):
|
|
18
|
-
|
|
39
|
+
kwargs.pop("tools", None)
|
|
40
|
+
super().__init__(
|
|
41
|
+
container_name=container_name, image=image, driver=driver, **kwargs
|
|
42
|
+
)
|
|
43
|
+
process_backend = backend
|
|
44
|
+
if process_backend is None:
|
|
45
|
+
process_backend = (
|
|
46
|
+
DockerProcessBackend()
|
|
47
|
+
if driver == "docker"
|
|
48
|
+
else KubernetesProcessBackend()
|
|
49
|
+
)
|
|
19
50
|
self.tools = {
|
|
20
51
|
"ContainerNewSessionTool": ContainerNewSessionTool(
|
|
21
52
|
container_name=container_name,
|
|
22
53
|
image=image,
|
|
54
|
+
driver=driver,
|
|
55
|
+
backend=backend,
|
|
23
56
|
),
|
|
24
57
|
"ContainerFeedCharsTool": ContainerFeedCharsTool(
|
|
25
58
|
container_name=container_name,
|
|
59
|
+
driver=driver,
|
|
60
|
+
backend=backend,
|
|
26
61
|
),
|
|
27
62
|
"ContainerMakePrTool": ContainerMakePrTool(
|
|
28
63
|
container_name=container_name,
|
|
64
|
+
driver=driver,
|
|
65
|
+
backend=backend,
|
|
66
|
+
),
|
|
67
|
+
"RunCommandTool": RunCommandTool(
|
|
68
|
+
backend=process_backend, workspace=container_name
|
|
69
|
+
),
|
|
70
|
+
"RunBashScriptTool": RunBashScriptTool(
|
|
71
|
+
backend=process_backend, workspace=container_name
|
|
72
|
+
),
|
|
73
|
+
"ReadProcessOutputTool": ReadProcessOutputTool(
|
|
74
|
+
backend=process_backend
|
|
29
75
|
),
|
|
76
|
+
"WriteStdinTool": WriteStdinTool(backend=process_backend),
|
|
77
|
+
"CancelProcessTool": CancelProcessTool(backend=process_backend),
|
|
30
78
|
}
|
|
@@ -1,44 +1,52 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: swarmauri_toolkit_containertoolkit
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0.dev4
|
|
4
4
|
Summary: Toolkit bundling container management tools.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Keywords: swarmauri,sdk,standards,toolkit,containertoolkit,tooling
|
|
8
8
|
Author: Jacob Stewart
|
|
9
9
|
Author-email: jacob@swarmauri.com
|
|
10
|
-
Requires-Python: >=3.10,<3.
|
|
10
|
+
Requires-Python: >=3.10,<3.15
|
|
11
11
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
15
12
|
Classifier: Programming Language :: Python
|
|
16
13
|
Classifier: Programming Language :: Python :: 3
|
|
17
14
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Requires-Dist:
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Requires-Dist: swarmauri_base (>=0.11.0.dev6,<0.12)
|
|
21
|
+
Requires-Dist: swarmauri_core (>=0.11.0.dev6,<0.12)
|
|
22
|
+
Requires-Dist: swarmauri_process_docker (>=0.1.0,<0.2)
|
|
23
|
+
Requires-Dist: swarmauri_process_kubernetes (>=0.1.0,<0.2)
|
|
24
|
+
Requires-Dist: swarmauri_standard (>=0.11.0.dev8,<0.12)
|
|
25
|
+
Requires-Dist: swarmauri_tool_cancelprocess (>=0.1.0,<0.2)
|
|
26
|
+
Requires-Dist: swarmauri_tool_containerfeedchars (>=0.11.0.dev4,<0.12)
|
|
27
|
+
Requires-Dist: swarmauri_tool_containermakepr (>=0.11.0.dev4,<0.12)
|
|
28
|
+
Requires-Dist: swarmauri_tool_containernewsession (>=0.11.0.dev4,<0.12)
|
|
29
|
+
Requires-Dist: swarmauri_tool_readprocessoutput (>=0.1.0,<0.2)
|
|
30
|
+
Requires-Dist: swarmauri_tool_runbashscript (>=0.1.0,<0.2)
|
|
31
|
+
Requires-Dist: swarmauri_tool_runcommand (>=0.1.0,<0.2)
|
|
32
|
+
Requires-Dist: swarmauri_tool_writestdin (>=0.1.0,<0.2)
|
|
24
33
|
Description-Content-Type: text/markdown
|
|
25
34
|
|
|
26
|
-

|
|
27
36
|
|
|
28
37
|
<p align="center">
|
|
29
|
-
<a href="https://
|
|
30
|
-
<img src="https://
|
|
38
|
+
<a href="https://pepy.tech/project/swarmauri_toolkit_containertoolkit/">
|
|
39
|
+
<img src="https://static.pepy.tech/badge/swarmauri_toolkit_containertoolkit/month" alt="PyPI - Downloads"/></a>
|
|
31
40
|
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_toolkit_containertoolkit/">
|
|
32
41
|
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_toolkit_containertoolkit.svg"/></a>
|
|
33
42
|
<a href="https://pypi.org/project/swarmauri_toolkit_containertoolkit/">
|
|
34
|
-
<img src="https://img.shields.io/
|
|
43
|
+
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
35
44
|
<a href="https://pypi.org/project/swarmauri_toolkit_containertoolkit/">
|
|
36
45
|
<img src="https://img.shields.io/pypi/l/swarmauri_toolkit_containertoolkit" alt="PyPI - License"/></a>
|
|
37
46
|
<a href="https://pypi.org/project/swarmauri_toolkit_containertoolkit/">
|
|
38
47
|
<img src="https://img.shields.io/pypi/v/swarmauri_toolkit_containertoolkit?label=swarmauri_toolkit_containertoolkit&color=green" alt="PyPI - swarmauri_toolkit_containertoolkit"/></a>
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
---
|
|
48
|
+
<a href="https://discord.gg/N4UpBuQv8T">
|
|
49
|
+
<img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
|
|
42
50
|
|
|
43
51
|
# Swarmauri Toolkit ContainerToolkit
|
|
44
52
|
|
|
@@ -59,3 +67,5 @@ toolkit = ContainerToolkit(container_name="my-container", image="ubuntu:latest")
|
|
|
59
67
|
print(toolkit.tools.keys())
|
|
60
68
|
```
|
|
61
69
|
|
|
70
|
+
|
|
71
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
swarmauri_toolkit_containertoolkit/ContainerToolkit.py,sha256=s8zoC96qoHDoaQcXQ7ygQYoShSPyXolCy_vn373qk68,3021
|
|
2
|
+
swarmauri_toolkit_containertoolkit/__init__.py,sha256=lNAHSR5sobQsUPoOO7ilG45IOQX4Xm57ZCyp5eS7HVs,400
|
|
3
|
+
swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info/METADATA,sha256=Xk--2Ic6jExxH_HCnlLen9b80hGXUqNzJw16xe6WIfU,3481
|
|
4
|
+
swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info/WHEEL,sha256=L-WvLdSBvJWHXv5zrQxDvNRnIgoBzLUpcbuiw19KCuQ,88
|
|
5
|
+
swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info/entry_points.txt,sha256=0O8ksIaRdHcXIzxtWpVpsxlMAZM7w0AANh-AfixtvGQ,91
|
|
6
|
+
swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info/licenses/LICENSE,sha256=djUXOlCxLVszShEpZXshZ7v33G-2qIC_j9KXpWKZSzQ,11359
|
|
7
|
+
swarmauri_toolkit_containertoolkit-0.11.0.dev4.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
swarmauri_toolkit_containertoolkit/ContainerToolkit.py,sha256=P-0uPRb16Sh6zccPTiCDr97EGdJPdpSX-Gu6Y7mjpxI,1136
|
|
2
|
-
swarmauri_toolkit_containertoolkit/__init__.py,sha256=lNAHSR5sobQsUPoOO7ilG45IOQX4Xm57ZCyp5eS7HVs,400
|
|
3
|
-
swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info/METADATA,sha256=PBL59AY-iKVc--e-e0gzs3xLNkOjdbj1dNXdu7igokc,2670
|
|
4
|
-
swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info/WHEEL,sha256=kJCRJT_g0adfAJzTx2GUMmS80rTJIVHRCfG0DQgLq3o,88
|
|
5
|
-
swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info/entry_points.txt,sha256=0O8ksIaRdHcXIzxtWpVpsxlMAZM7w0AANh-AfixtvGQ,91
|
|
6
|
-
swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info/licenses/LICENSE,sha256=djUXOlCxLVszShEpZXshZ7v33G-2qIC_j9KXpWKZSzQ,11359
|
|
7
|
-
swarmauri_toolkit_containertoolkit-0.8.0.dev52.dist-info/RECORD,,
|
|
File without changes
|