PyObservability 0.0.1__py3-none-any.whl → 0.0.2__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.
- pyobservability/config/settings.py +2 -1
- pyobservability/main.py +4 -4
- pyobservability/version.py +1 -1
- {pyobservability-0.0.1.dist-info → pyobservability-0.0.2.dist-info}/METADATA +1 -1
- {pyobservability-0.0.1.dist-info → pyobservability-0.0.2.dist-info}/RECORD +9 -9
- {pyobservability-0.0.1.dist-info → pyobservability-0.0.2.dist-info}/WHEEL +0 -0
- {pyobservability-0.0.1.dist-info → pyobservability-0.0.2.dist-info}/entry_points.txt +0 -0
- {pyobservability-0.0.1.dist-info → pyobservability-0.0.2.dist-info}/licenses/LICENSE +0 -0
- {pyobservability-0.0.1.dist-info → pyobservability-0.0.2.dist-info}/top_level.txt +0 -0
|
@@ -46,7 +46,8 @@ def alias_choices(variable: str) -> AliasChoices:
|
|
|
46
46
|
AliasChoices:
|
|
47
47
|
Returns the alias choices for the variable.
|
|
48
48
|
"""
|
|
49
|
-
|
|
49
|
+
choices = (variable, variable.lower(), f"MONITOR_{variable}", f"monitor_{variable.lower()}")
|
|
50
|
+
return AliasChoices(*choices)
|
|
50
51
|
|
|
51
52
|
|
|
52
53
|
class EnvConfig(PydanticEnvConfig):
|
pyobservability/main.py
CHANGED
|
@@ -32,7 +32,7 @@ async def index(request: Request):
|
|
|
32
32
|
Args:
|
|
33
33
|
request: FastAPI request object.
|
|
34
34
|
"""
|
|
35
|
-
return templates.TemplateResponse("index.html", {"request": request, "targets": settings.env.
|
|
35
|
+
return templates.TemplateResponse("index.html", {"request": request, "targets": settings.env.targets})
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
async def websocket_endpoint(websocket: WebSocket):
|
|
@@ -41,7 +41,7 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
|
41
41
|
Args:
|
|
42
42
|
websocket: FastAPI websocket object.
|
|
43
43
|
"""
|
|
44
|
-
monitor = Monitor(targets=settings.env.
|
|
44
|
+
monitor = Monitor(targets=settings.env.targets, poll_interval=settings.env.interval)
|
|
45
45
|
await websocket.accept()
|
|
46
46
|
await monitor.start()
|
|
47
47
|
q = monitor.subscribe()
|
|
@@ -100,8 +100,8 @@ def include_routes():
|
|
|
100
100
|
|
|
101
101
|
def start(**kwargs):
|
|
102
102
|
settings.env = settings.env_loader(**kwargs)
|
|
103
|
-
settings.env.
|
|
104
|
-
{k: str(v) for k, v in target.model_dump().items()} for target in settings.env.
|
|
103
|
+
settings.env.targets = [
|
|
104
|
+
{k: str(v) for k, v in target.model_dump().items()} for target in settings.env.targets
|
|
105
105
|
]
|
|
106
106
|
include_routes()
|
|
107
107
|
uvicorn_args = dict(
|
pyobservability/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.2"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
pyobservability/__init__.py,sha256=rr4udGMbbNPl3yo7l8R3FUUVVahBtYVaW6vSWWgXlv0,2617
|
|
2
|
-
pyobservability/main.py,sha256=
|
|
2
|
+
pyobservability/main.py,sha256=QCoALD_vk3S5XKEIwMI_LzfNixzq7xpIS0uA21uMqs0,3414
|
|
3
3
|
pyobservability/monitor.py,sha256=s2sVp97sLjkkdtL6be82bX5ydu_gBdMSoWxDlmUtpgE,6613
|
|
4
|
-
pyobservability/version.py,sha256=
|
|
4
|
+
pyobservability/version.py,sha256=QvlVh4JTl3JL7jQAja76yKtT-IvF4631ASjWY1wS6AQ,22
|
|
5
5
|
pyobservability/config/enums.py,sha256=iMIOpa8LYSszkPIYBhupX--KrEXVTTsBurinpAxLvMA,86
|
|
6
|
-
pyobservability/config/settings.py,sha256=
|
|
6
|
+
pyobservability/config/settings.py,sha256=HoDRuzwCCbCdNQLdOiy9JUoiM2BqUsRkX6zUyDLordY,3811
|
|
7
7
|
pyobservability/static/app.js,sha256=poc7eReoiRUbyI5JKnPwxSqmSNCuOge4aZKCITFy7eo,13494
|
|
8
8
|
pyobservability/static/styles.css,sha256=t6r1C0ueBanipgRRjdu18nmq6RbSGLK5bhpf0BdMOpQ,3245
|
|
9
9
|
pyobservability/templates/index.html,sha256=PsN3aq-7Q6RzGeshoNH5v37G3sHoI2saJq6mfuA6JYs,3977
|
|
10
|
-
pyobservability-0.0.
|
|
11
|
-
pyobservability-0.0.
|
|
12
|
-
pyobservability-0.0.
|
|
13
|
-
pyobservability-0.0.
|
|
14
|
-
pyobservability-0.0.
|
|
15
|
-
pyobservability-0.0.
|
|
10
|
+
pyobservability-0.0.2.dist-info/licenses/LICENSE,sha256=_sOIKJWdD2o1WwwDIwYB2qTP2nlSWqT5Tyg9jr1Xa4w,1070
|
|
11
|
+
pyobservability-0.0.2.dist-info/METADATA,sha256=EDg-mzHBxxLTq93gbc1WhIKE3d0B_d_nXhSgiuO6sJI,6822
|
|
12
|
+
pyobservability-0.0.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
pyobservability-0.0.2.dist-info/entry_points.txt,sha256=DSGIr_VA8Tb3FYa2iNUYpf55eAvuFCAoInNS4ngXaME,57
|
|
14
|
+
pyobservability-0.0.2.dist-info/top_level.txt,sha256=p20T0EmihDYW1uMintRXr7X9bg3XWYKyoSbBHOVC1xI,16
|
|
15
|
+
pyobservability-0.0.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|