swarmauri_tool_containerfeedchars 0.9.0.dev50__tar.gz → 0.11.0.dev4__tar.gz
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_tool_containerfeedchars-0.9.0.dev50 → swarmauri_tool_containerfeedchars-0.11.0.dev4}/PKG-INFO +18 -15
- {swarmauri_tool_containerfeedchars-0.9.0.dev50 → swarmauri_tool_containerfeedchars-0.11.0.dev4}/README.md +8 -8
- {swarmauri_tool_containerfeedchars-0.9.0.dev50 → swarmauri_tool_containerfeedchars-0.11.0.dev4}/pyproject.toml +11 -9
- {swarmauri_tool_containerfeedchars-0.9.0.dev50 → swarmauri_tool_containerfeedchars-0.11.0.dev4}/swarmauri_tool_containerfeedchars/ContainerFeedCharsTool.py +19 -2
- {swarmauri_tool_containerfeedchars-0.9.0.dev50 → swarmauri_tool_containerfeedchars-0.11.0.dev4}/LICENSE +0 -0
- {swarmauri_tool_containerfeedchars-0.9.0.dev50 → swarmauri_tool_containerfeedchars-0.11.0.dev4}/swarmauri_tool_containerfeedchars/__init__.py +0 -0
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: swarmauri_tool_containerfeedchars
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0.dev4
|
|
4
4
|
Summary: Execute commands in Docker or Kubernetes containers.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Keywords: swarmauri,sdk,standards,tool,containerfeedchars,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
|
-
|
|
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_standard (>=0.11.0.dev8,<0.12)
|
|
21
23
|
Description-Content-Type: text/markdown
|
|
22
24
|
|
|
23
|
-

|
|
24
26
|
|
|
25
27
|
<p align="center">
|
|
26
|
-
<a href="https://
|
|
27
|
-
<img src="https://
|
|
28
|
+
<a href="https://pepy.tech/project/swarmauri_tool_containerfeedchars/">
|
|
29
|
+
<img src="https://static.pepy.tech/badge/swarmauri_tool_containerfeedchars/month" alt="PyPI - Downloads"/></a>
|
|
28
30
|
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_tool_containerfeedchars/">
|
|
29
31
|
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_tool_containerfeedchars.svg"/></a>
|
|
30
32
|
<a href="https://pypi.org/project/swarmauri_tool_containerfeedchars/">
|
|
31
|
-
<img src="https://img.shields.io/
|
|
33
|
+
<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>
|
|
32
34
|
<a href="https://pypi.org/project/swarmauri_tool_containerfeedchars/">
|
|
33
35
|
<img src="https://img.shields.io/pypi/l/swarmauri_tool_containerfeedchars" alt="PyPI - License"/></a>
|
|
34
36
|
<a href="https://pypi.org/project/swarmauri_tool_containerfeedchars/">
|
|
35
37
|
<img src="https://img.shields.io/pypi/v/swarmauri_tool_containerfeedchars?label=swarmauri_tool_containerfeedchars&color=green" alt="PyPI - swarmauri_tool_containerfeedchars"/></a>
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
---
|
|
38
|
+
<a href="https://discord.gg/N4UpBuQv8T">
|
|
39
|
+
<img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
|
|
39
40
|
|
|
40
41
|
# Swarmauri Tool ContainerFeedChars
|
|
41
42
|
|
|
@@ -62,3 +63,5 @@ print(output["stdout"])
|
|
|
62
63
|
If you want to contribute to swarmauri-sdk, read up on our
|
|
63
64
|
[guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
|
|
64
65
|
that will help you get started.
|
|
66
|
+
|
|
67
|
+
|
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<a href="https://
|
|
5
|
-
<img src="https://
|
|
4
|
+
<a href="https://pepy.tech/project/swarmauri_tool_containerfeedchars/">
|
|
5
|
+
<img src="https://static.pepy.tech/badge/swarmauri_tool_containerfeedchars/month" alt="PyPI - Downloads"/></a>
|
|
6
6
|
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_tool_containerfeedchars/">
|
|
7
7
|
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/standards/swarmauri_tool_containerfeedchars.svg"/></a>
|
|
8
8
|
<a href="https://pypi.org/project/swarmauri_tool_containerfeedchars/">
|
|
9
|
-
<img src="https://img.shields.io/
|
|
9
|
+
<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>
|
|
10
10
|
<a href="https://pypi.org/project/swarmauri_tool_containerfeedchars/">
|
|
11
11
|
<img src="https://img.shields.io/pypi/l/swarmauri_tool_containerfeedchars" alt="PyPI - License"/></a>
|
|
12
12
|
<a href="https://pypi.org/project/swarmauri_tool_containerfeedchars/">
|
|
13
13
|
<img src="https://img.shields.io/pypi/v/swarmauri_tool_containerfeedchars?label=swarmauri_tool_containerfeedchars&color=green" alt="PyPI - swarmauri_tool_containerfeedchars"/></a>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
---
|
|
14
|
+
<a href="https://discord.gg/N4UpBuQv8T">
|
|
15
|
+
<img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
|
|
17
16
|
|
|
18
17
|
# Swarmauri Tool ContainerFeedChars
|
|
19
18
|
|
|
@@ -39,4 +38,5 @@ print(output["stdout"])
|
|
|
39
38
|
|
|
40
39
|
If you want to contribute to swarmauri-sdk, read up on our
|
|
41
40
|
[guidelines for contributing](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md)
|
|
42
|
-
that will help you get started.
|
|
41
|
+
that will help you get started.
|
|
42
|
+
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "swarmauri_tool_containerfeedchars"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.11.0.dev4"
|
|
4
4
|
description = "Execute commands in Docker or Kubernetes containers."
|
|
5
5
|
license = "Apache-2.0"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
repository = "http://github.com/swarmauri/swarmauri-sdk"
|
|
8
|
-
requires-python = ">=3.10,<3.
|
|
8
|
+
requires-python = ">=3.10,<3.15"
|
|
9
9
|
classifiers = [
|
|
10
10
|
"License :: OSI Approved :: Apache Software License",
|
|
11
|
-
"Programming Language :: Python :: 3.10",
|
|
12
|
-
"Programming Language :: Python :: 3.11",
|
|
13
|
-
"Programming Language :: Python :: 3.12",
|
|
14
11
|
"Programming Language :: Python",
|
|
15
12
|
"Programming Language :: Python :: 3",
|
|
16
13
|
"Programming Language :: Python :: 3 :: Only",
|
|
14
|
+
"Programming Language :: Python :: 3.10",
|
|
15
|
+
"Programming Language :: Python :: 3.11",
|
|
16
|
+
"Programming Language :: Python :: 3.12",
|
|
17
|
+
"Programming Language :: Python :: 3.13",
|
|
18
|
+
"Programming Language :: Python :: 3.14",
|
|
17
19
|
]
|
|
18
20
|
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
19
21
|
dependencies = [
|
|
20
|
-
"swarmauri_core",
|
|
21
|
-
"swarmauri_base",
|
|
22
|
-
"swarmauri_standard",
|
|
22
|
+
"swarmauri_core>=0.11.0.dev6,<0.12",
|
|
23
|
+
"swarmauri_base>=0.11.0.dev6,<0.12",
|
|
24
|
+
"swarmauri_standard>=0.11.0.dev8,<0.12",
|
|
23
25
|
]
|
|
24
26
|
keywords = [
|
|
25
27
|
'swarmauri',
|
|
@@ -69,7 +71,7 @@ dev = [
|
|
|
69
71
|
"pytest-xdist>=3.6.1",
|
|
70
72
|
"pytest-json-report>=1.5.0",
|
|
71
73
|
"python-dotenv",
|
|
72
|
-
"
|
|
74
|
+
"httpx>=0.27",
|
|
73
75
|
"flake8>=7.0",
|
|
74
76
|
"pytest-timeout>=2.3.1",
|
|
75
77
|
"ruff>=0.9.9",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import subprocess
|
|
2
2
|
from typing import List, Literal
|
|
3
|
+
from swarmauri_base.processes.collect_process import collect_process
|
|
4
|
+
from swarmauri_core.processes import IProcessBackend, ProcessRequest
|
|
5
|
+
|
|
3
6
|
from pydantic import Field
|
|
4
7
|
from swarmauri_base.tools.ToolBase import ToolBase
|
|
5
8
|
from swarmauri_standard.tools.Parameter import Parameter
|
|
@@ -12,9 +15,13 @@ class ContainerFeedCharsTool(ToolBase):
|
|
|
12
15
|
|
|
13
16
|
version: str = "1.0.0"
|
|
14
17
|
name: str = "ContainerFeedCharsTool"
|
|
15
|
-
description: str =
|
|
18
|
+
description: str = (
|
|
19
|
+
"Run a shell command inside a Docker or Kubernetes container."
|
|
20
|
+
)
|
|
16
21
|
type: Literal["ContainerFeedCharsTool"] = "ContainerFeedCharsTool"
|
|
17
22
|
|
|
23
|
+
backend: IProcessBackend | None = Field(default=None, exclude=True)
|
|
24
|
+
|
|
18
25
|
driver: Literal["docker", "kubernetes"] = "docker"
|
|
19
26
|
|
|
20
27
|
container_name: str | None = Field(
|
|
@@ -38,10 +45,20 @@ class ContainerFeedCharsTool(ToolBase):
|
|
|
38
45
|
]
|
|
39
46
|
)
|
|
40
47
|
|
|
41
|
-
def __call__(
|
|
48
|
+
def __call__(
|
|
49
|
+
self, command: str, container_name: str | None = None
|
|
50
|
+
) -> dict:
|
|
42
51
|
name = container_name or self.container_name
|
|
43
52
|
if name is None:
|
|
44
53
|
raise ValueError("container_name must be provided")
|
|
54
|
+
if self.backend is not None:
|
|
55
|
+
stdout, stderr, event = collect_process(
|
|
56
|
+
self.backend,
|
|
57
|
+
ProcessRequest(("sh", "-c", command), workspace=name),
|
|
58
|
+
)
|
|
59
|
+
if event.exit_code != 0:
|
|
60
|
+
raise RuntimeError(stderr.decode(errors="replace").strip())
|
|
61
|
+
return {"stdout": stdout.decode(errors="replace").strip()}
|
|
45
62
|
if self.driver == "docker":
|
|
46
63
|
cmd = ["docker", "exec", name, "sh", "-c", command]
|
|
47
64
|
else:
|
|
File without changes
|