oe-python-template-example 0.4.18__tar.gz → 0.5.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.
Files changed (40) hide show
  1. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/PKG-INFO +1 -1
  2. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/pyproject.toml +2 -2
  3. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/system/_service.py +34 -3
  4. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/.gitignore +0 -0
  5. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/LICENSE +0 -0
  6. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/README.md +0 -0
  7. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/__init__.py +0 -0
  8. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/api.py +0 -0
  9. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/cli.py +0 -0
  10. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/constants.py +0 -0
  11. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/hello/__init__.py +0 -0
  12. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/hello/_api.py +0 -0
  13. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/hello/_cli.py +0 -0
  14. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/hello/_constants.py +0 -0
  15. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/hello/_gui.py +0 -0
  16. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/hello/_models.py +0 -0
  17. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/hello/_service.py +0 -0
  18. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/hello/_settings.py +0 -0
  19. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/system/__init__.py +0 -0
  20. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/system/_api.py +0 -0
  21. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/system/_cli.py +0 -0
  22. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/system/_gui.py +0 -0
  23. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/system/_settings.py +0 -0
  24. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/.vendored/bottle.py +0 -0
  25. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/__init__.py +0 -0
  26. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_api.py +0 -0
  27. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_cli.py +0 -0
  28. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_console.py +0 -0
  29. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_constants.py +0 -0
  30. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_di.py +0 -0
  31. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_gui.py +0 -0
  32. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_health.py +0 -0
  33. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_log.py +0 -0
  34. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_logfire.py +0 -0
  35. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_notebook.py +0 -0
  36. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_process.py +0 -0
  37. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_sentry.py +0 -0
  38. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_service.py +0 -0
  39. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/_settings.py +0 -0
  40. {oe_python_template_example-0.4.18 → oe_python_template_example-0.5.0}/src/oe_python_template_example/utils/boot.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oe-python-template-example
3
- Version: 0.4.18
3
+ Version: 0.5.0
4
4
  Summary: 🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template).
5
5
  Project-URL: Homepage, https://oe-python-template-example.readthedocs.io/en/latest/
6
6
  Project-URL: Documentation, https://oe-python-template-example.readthedocs.io/en/latest/
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "oe-python-template-example"
3
- version = "0.4.18"
3
+ version = "0.5.0"
4
4
  description = "🧠 Example project scaffolded and kept up to date with OE Python Template (oe-python-template)."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -290,7 +290,7 @@ source = ["src/"]
290
290
 
291
291
 
292
292
  [tool.bumpversion]
293
- current_version = "0.4.18"
293
+ current_version = "0.5.0"
294
294
  parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
295
295
  serialize = ["{major}.{minor}.{patch}"]
296
296
  search = "{current_version}"
@@ -151,9 +151,15 @@ class Service(BaseService):
151
151
  Returns:
152
152
  dict[str, Any]: Service configuration.
153
153
  """
154
+ import psutil # noqa: PLC0415
154
155
  from uptime import boottime, uptime # 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=2)
161
+ cpu_times_percent = psutil.cpu_times_percent(interval=2)
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(),