container-manager-mcp 1.1.6__py3-none-any.whl → 1.1.7__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.
Potentially problematic release.
This version of container-manager-mcp might be problematic. Click here for more details.
- container_manager_mcp/container_manager.py +28 -8
- {container_manager_mcp-1.1.6.dist-info → container_manager_mcp-1.1.7.dist-info}/METADATA +2 -2
- container_manager_mcp-1.1.7.dist-info/RECORD +10 -0
- container_manager_mcp-1.1.6.dist-info/RECORD +0 -10
- {container_manager_mcp-1.1.6.dist-info → container_manager_mcp-1.1.7.dist-info}/WHEEL +0 -0
- {container_manager_mcp-1.1.6.dist-info → container_manager_mcp-1.1.7.dist-info}/entry_points.txt +0 -0
- {container_manager_mcp-1.1.6.dist-info → container_manager_mcp-1.1.7.dist-info}/licenses/LICENSE +0 -0
- {container_manager_mcp-1.1.6.dist-info → container_manager_mcp-1.1.7.dist-info}/top_level.txt +0 -0
|
@@ -11,7 +11,6 @@ import json
|
|
|
11
11
|
import shutil
|
|
12
12
|
import subprocess
|
|
13
13
|
from datetime import datetime
|
|
14
|
-
import dateutil.parser
|
|
15
14
|
import platform
|
|
16
15
|
import traceback
|
|
17
16
|
|
|
@@ -74,18 +73,39 @@ class ContainerManagerBase(ABC):
|
|
|
74
73
|
size_bytes /= 1024.0
|
|
75
74
|
return f"{size_bytes:.2f}PB"
|
|
76
75
|
|
|
77
|
-
def _parse_timestamp(
|
|
78
|
-
"""Parse timestamp (integer or string) to ISO 8601 string."""
|
|
76
|
+
def _parse_timestamp(timestamp: Any) -> str:
|
|
77
|
+
"""Parse timestamp (integer, float, or string) to ISO 8601 string."""
|
|
79
78
|
if not timestamp:
|
|
80
79
|
return "unknown"
|
|
80
|
+
|
|
81
|
+
# Handle numeric timestamps (Unix timestamps in seconds)
|
|
81
82
|
if isinstance(timestamp, (int, float)):
|
|
82
|
-
return datetime.fromtimestamp(timestamp).strftime("%Y-%m-%dT%H:%M:%S")
|
|
83
|
-
if isinstance(timestamp, str):
|
|
84
83
|
try:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
except ValueError:
|
|
84
|
+
return datetime.fromtimestamp(timestamp).strftime("%Y-%m-%dT%H:%M:%S")
|
|
85
|
+
except (ValueError, OSError):
|
|
88
86
|
return "unknown"
|
|
87
|
+
|
|
88
|
+
# Handle string timestamps
|
|
89
|
+
if isinstance(timestamp, str):
|
|
90
|
+
# Common ISO 8601-like formats to try
|
|
91
|
+
formats = [
|
|
92
|
+
"%Y-%m-%dT%H:%M:%S", # 2023-10-05T14:30:00
|
|
93
|
+
"%Y-%m-%d %H:%M:%S", # 2023-10-05 14:30:00
|
|
94
|
+
"%Y-%m-%dT%H:%M:%S%z", # 2023-10-05T14:30:00+0000
|
|
95
|
+
"%Y-%m-%d %H:%M:%S%z", # 2023-10-05 14:30:00+0000
|
|
96
|
+
"%Y-%m-%dT%H:%M:%S.%f", # 2023-10-05T14:30:00.123456
|
|
97
|
+
"%Y-%m-%d %H:%M:%S.%f", # 2023-10-05 14:30:00.123456
|
|
98
|
+
"%Y-%m-%dT%H:%M:%S.%f%z", # 2023-10-05T14:30:00.123456+0000
|
|
99
|
+
"%Y-%m-%d", # 2023-10-05
|
|
100
|
+
]
|
|
101
|
+
for fmt in formats:
|
|
102
|
+
try:
|
|
103
|
+
parsed = datetime.strptime(timestamp, fmt)
|
|
104
|
+
return parsed.strftime("%Y-%m-%dT%H:%M:%S")
|
|
105
|
+
except ValueError:
|
|
106
|
+
continue
|
|
107
|
+
return "unknown"
|
|
108
|
+
|
|
89
109
|
return "unknown"
|
|
90
110
|
|
|
91
111
|
@abstractmethod
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: container-manager-mcp
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.7
|
|
4
4
|
Summary: Container Manager manage Docker, Docker Swarm, and Podman containers as an MCP Server
|
|
5
5
|
Author-email: Audel Rouhi <knucklessg1@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -48,7 +48,7 @@ Dynamic: license-file
|
|
|
48
48
|

|
|
49
49
|

|
|
50
50
|
|
|
51
|
-
*Version: 1.1.
|
|
51
|
+
*Version: 1.1.7*
|
|
52
52
|
|
|
53
53
|
Container Manager MCP Server provides a robust interface to manage Docker and Podman containers, networks, volumes, and Docker Swarm services through a FastMCP server, enabling programmatic and remote container management.
|
|
54
54
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
container_manager_mcp/__init__.py,sha256=Ms3YyGmXg_n_khL1yrD5KKxmTCGJqNhTpg-IGEuboag,860
|
|
2
|
+
container_manager_mcp/__main__.py,sha256=4bpregRyaWJBXOg9_h_F4xcHcX6bPVLL48V2EuwNGBs,168
|
|
3
|
+
container_manager_mcp/container_manager.py,sha256=D8Bleeop3nIlYb5JBkEmhNG6utnJ8JJPuN6bHTmPAto,90354
|
|
4
|
+
container_manager_mcp/container_manager_mcp.py,sha256=m45h93-1S2qM8TUNQYP43V5HUgV1QJeyW8b9Fj9hiLQ,55392
|
|
5
|
+
container_manager_mcp-1.1.7.dist-info/licenses/LICENSE,sha256=Z1xmcrPHBnGCETO_LLQJUeaSNBSnuptcDVTt4kaPUOE,1060
|
|
6
|
+
container_manager_mcp-1.1.7.dist-info/METADATA,sha256=mbHiWo4UbK_OW42qa-49OZTBuIAOKO5Y24OM7zlMyME,8452
|
|
7
|
+
container_manager_mcp-1.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
container_manager_mcp-1.1.7.dist-info/entry_points.txt,sha256=n7fE9uXdRktmjvZwyaiQkY0Dd7tMN6AKiHav0ZQdE2I,186
|
|
9
|
+
container_manager_mcp-1.1.7.dist-info/top_level.txt,sha256=B7QQLOd9mBdu0lsPKqyu4T8-zUtbqKzQJbMbtAzoozU,22
|
|
10
|
+
container_manager_mcp-1.1.7.dist-info/RECORD,,
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
container_manager_mcp/__init__.py,sha256=Ms3YyGmXg_n_khL1yrD5KKxmTCGJqNhTpg-IGEuboag,860
|
|
2
|
-
container_manager_mcp/__main__.py,sha256=4bpregRyaWJBXOg9_h_F4xcHcX6bPVLL48V2EuwNGBs,168
|
|
3
|
-
container_manager_mcp/container_manager.py,sha256=Rtqrb4H05thq_i7z7v7M33m5rrNZ1V5rYWwV2NC8Zwo,89504
|
|
4
|
-
container_manager_mcp/container_manager_mcp.py,sha256=m45h93-1S2qM8TUNQYP43V5HUgV1QJeyW8b9Fj9hiLQ,55392
|
|
5
|
-
container_manager_mcp-1.1.6.dist-info/licenses/LICENSE,sha256=Z1xmcrPHBnGCETO_LLQJUeaSNBSnuptcDVTt4kaPUOE,1060
|
|
6
|
-
container_manager_mcp-1.1.6.dist-info/METADATA,sha256=Hl2B6v2uNlRbQAZYPUC01q08dUfFK_NDf71cc0dKBrw,8452
|
|
7
|
-
container_manager_mcp-1.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
container_manager_mcp-1.1.6.dist-info/entry_points.txt,sha256=n7fE9uXdRktmjvZwyaiQkY0Dd7tMN6AKiHav0ZQdE2I,186
|
|
9
|
-
container_manager_mcp-1.1.6.dist-info/top_level.txt,sha256=B7QQLOd9mBdu0lsPKqyu4T8-zUtbqKzQJbMbtAzoozU,22
|
|
10
|
-
container_manager_mcp-1.1.6.dist-info/RECORD,,
|
|
File without changes
|
{container_manager_mcp-1.1.6.dist-info → container_manager_mcp-1.1.7.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{container_manager_mcp-1.1.6.dist-info → container_manager_mcp-1.1.7.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{container_manager_mcp-1.1.6.dist-info → container_manager_mcp-1.1.7.dist-info}/top_level.txt
RENAMED
|
File without changes
|