glances_api 0.8.0__tar.gz → 0.9.0__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.
- {glances_api-0.8.0 → glances_api-0.9.0}/PKG-INFO +2 -1
- {glances_api-0.8.0 → glances_api-0.9.0}/glances_api/__init__.py +11 -2
- {glances_api-0.8.0 → glances_api-0.9.0}/pyproject.toml +1 -1
- {glances_api-0.8.0 → glances_api-0.9.0}/LICENSE +0 -0
- {glances_api-0.8.0 → glances_api-0.9.0}/README.rst +0 -0
- {glances_api-0.8.0 → glances_api-0.9.0}/glances_api/exceptions.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: glances_api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Python API for interacting with Glances
|
|
5
5
|
Home-page: https://github.com/home-assistant-ecosystem/python-glances-api
|
|
6
6
|
License: MIT
|
|
@@ -17,6 +17,7 @@ Classifier: Operating System :: POSIX
|
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
21
|
Classifier: Topic :: Utilities
|
|
21
22
|
Requires-Dist: httpx (>=0.23,<1)
|
|
22
23
|
Project-URL: Repository, https://github.com/home-assistant-ecosystem/python-glances-api/releases
|
|
@@ -134,8 +134,9 @@ class Glances:
|
|
|
134
134
|
}
|
|
135
135
|
if data := self.data.get("load"):
|
|
136
136
|
sensor_data["load"] = {
|
|
137
|
-
"processor_load": data.get("min15")
|
|
138
|
-
|
|
137
|
+
"processor_load": data.get("min15"),
|
|
138
|
+
"processor_load_1m": data.get("min1"),
|
|
139
|
+
"processor_load_5m": data.get("min5"),
|
|
139
140
|
}
|
|
140
141
|
if data := self.data.get("processcount"):
|
|
141
142
|
sensor_data["processcount"] = {
|
|
@@ -182,6 +183,7 @@ class Glances:
|
|
|
182
183
|
# Glances v4 provides a list of containers
|
|
183
184
|
containers_data = self.data.get("containers")
|
|
184
185
|
if containers_data:
|
|
186
|
+
sensor_data["containers"] = {}
|
|
185
187
|
active_containers = [
|
|
186
188
|
container
|
|
187
189
|
for container in containers_data
|
|
@@ -198,6 +200,13 @@ class Glances:
|
|
|
198
200
|
for container in active_containers:
|
|
199
201
|
mem_use += container["memory"].get("usage", 0)
|
|
200
202
|
sensor_data["docker"]["docker_memory_use"] = round(mem_use / 1024**2, 1)
|
|
203
|
+
for container in active_containers:
|
|
204
|
+
sensor_data["containers"][container["name"]] = {
|
|
205
|
+
"container_cpu_use": round(container["cpu"].get("total", 0), 1),
|
|
206
|
+
"container_memory_use": round(
|
|
207
|
+
container["memory"].get("usage", 0) / 1024**2, 1
|
|
208
|
+
),
|
|
209
|
+
}
|
|
201
210
|
if data := self.data.get("raid"):
|
|
202
211
|
sensor_data["raid"] = data
|
|
203
212
|
if data := self.data.get("uptime"):
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "glances_api"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.9.0"
|
|
4
4
|
description = "Python API for interacting with Glances"
|
|
5
5
|
authors = ["Fabian Affolter <fabian@affolter-engineering.ch>"]
|
|
6
6
|
homepage = "https://github.com/home-assistant-ecosystem/python-glances-api"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|