oe-python-template 0.16.9__py3-none-any.whl → 0.16.12__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.
@@ -152,8 +152,14 @@ class Service(BaseService):
152
152
  dict[str, Any]: Service configuration.
153
153
  """
154
154
  from uptime import boottime, uptime # noqa: PLC0415
155
+ import psutil # noqa: PLC0415
155
156
 
156
157
  bootdatetime = boottime()
158
+ vmem = psutil.virtual_memory()
159
+ swap = psutil.swap_memory()
160
+ cpu_percent = psutil.cpu_percent(interval=5)
161
+ cpu_times_percent = psutil.cpu_times_percent(interval=5)
162
+
157
163
  rtn: InfoDict = {
158
164
  "package": {
159
165
  "version": __version__,
@@ -177,9 +183,34 @@ class Service(BaseService):
177
183
  "version": platform.version(),
178
184
  },
179
185
  "machine": {
180
- "arch": platform.machine(),
181
- "processor": platform.processor(),
182
- "cpu_count": os.cpu_count(),
186
+ "cpu": {
187
+ "percent": cpu_percent,
188
+ "load_avg": psutil.getloadavg(),
189
+ "user": cpu_times_percent.user,
190
+ "system": cpu_times_percent.system,
191
+ "idle": cpu_times_percent.idle,
192
+ "arch": platform.machine(),
193
+ "processor": platform.processor(),
194
+ "count": os.cpu_count(),
195
+ "frequency": {
196
+ "current": psutil.cpu_freq().max,
197
+ "min": psutil.cpu_freq().max,
198
+ "max": psutil.cpu_freq().max,
199
+ },
200
+ },
201
+ "memory": {
202
+ "percent": vmem.percent,
203
+ "total": vmem.total,
204
+ "available": vmem.available,
205
+ "used": vmem.used,
206
+ "free": vmem.free,
207
+ },
208
+ "swap": {
209
+ "percent": swap.percent,
210
+ "total": swap.total,
211
+ "used": swap.used,
212
+ "free": swap.free,
213
+ },
183
214
  },
184
215
  "network": {
185
216
  "hostname": platform.node(),
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template
3
- Version: 0.16.9
3
+ Version: 0.16.12
4
4
  Summary: 🧠 Copier template to scaffold Python projects compliant with best practices and modern tooling.
5
5
  Project-URL: Homepage, https://oe-python-template.readthedocs.io/en/latest/
6
6
  Project-URL: Documentation, https://oe-python-template.readthedocs.io/en/latest/
@@ -14,7 +14,7 @@ oe_python_template/system/__init__.py,sha256=7e2z8HATzy3dAIBXy5PM9rlCC7Rbu8m8Nap
14
14
  oe_python_template/system/_api.py,sha256=pBBCL1gXM7W5dgJqBLKuNFWES0pQF8mbUgQ7H7oHwh8,3714
15
15
  oe_python_template/system/_cli.py,sha256=fVO_TSIyiaMJ2ACeQ4gPy4QQZjmeBVnsxxsViuNGe8I,6990
16
16
  oe_python_template/system/_gui.py,sha256=9U4QMkl1mVJargg_gQ7U8tMlvec4b1cqkTgRcmmyTTc,678
17
- oe_python_template/system/_service.py,sha256=bydquEzYM_gfBSdsDKjqKo2bmEMftgSQWMCuPuZ88O0,8841
17
+ oe_python_template/system/_service.py,sha256=EDw4byGRO7uxSNW1zyAmTcbJUlOecayV7wXgk7_zP4I,10276
18
18
  oe_python_template/system/_settings.py,sha256=MwMAJYifJ6jGImeSh4e9shmIXmiUSuQGHXz_Ts0mSdk,901
19
19
  oe_python_template/utils/__init__.py,sha256=oM8v1ozMOeBQG-EbBtEGbnuGk52mYNDAmNoR7vNQ7MY,2050
20
20
  oe_python_template/utils/_api.py,sha256=GSI-HPtSdTFv0qP5aTDPa2WS3ewVa1slusG6dvxSu0Y,2474
@@ -33,8 +33,8 @@ oe_python_template/utils/_service.py,sha256=atHAejvBucKXjzhsMSdOBBFa7rRD74zcV70P
33
33
  oe_python_template/utils/_settings.py,sha256=owFoaHEzJnVD3EVyOWF4rfIY7g6eLnU6rN0m4VHhCbA,2464
34
34
  oe_python_template/utils/boot.py,sha256=Qgq1sjT8d3fcfibnMyx5CVUJ_KKXgFI3ozZUIJbhh4I,2921
35
35
  oe_python_template/utils/.vendored/bottle.py,sha256=kZAZmh3nRzCUf-9IKGpv0yqlMciZMA_DNaaMDdcQmt0,175437
36
- oe_python_template-0.16.9.dist-info/METADATA,sha256=XjMYJzkIoz9l7aAV9l3_0e3_sF5yfbwZLRoHUjsmpyA,34606
37
- oe_python_template-0.16.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
- oe_python_template-0.16.9.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
39
- oe_python_template-0.16.9.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
40
- oe_python_template-0.16.9.dist-info/RECORD,,
36
+ oe_python_template-0.16.12.dist-info/METADATA,sha256=fV8DwQW12DIBUwEkqxFKo7qkyWaSOaKsfkoHAd-VFfE,34607
37
+ oe_python_template-0.16.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
+ oe_python_template-0.16.12.dist-info/entry_points.txt,sha256=IroSSWhLGxus9rxcashkYQda39TTvf7LbUMYtOKXUBE,66
39
+ oe_python_template-0.16.12.dist-info/licenses/LICENSE,sha256=5H409K6xzz9U5eUaoAHQExNkoWJRlU0LEj6wL2QJ34s,1113
40
+ oe_python_template-0.16.12.dist-info/RECORD,,