pythonkuma 0.3.2__tar.gz → 0.4.0rc0__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.
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/PKG-INFO +1 -1
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/pyproject.toml +7 -7
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/pythonkuma/__init__.py +1 -1
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/pythonkuma/models.py +11 -0
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/pythonkuma/uptimekuma.py +6 -2
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/.gitignore +0 -0
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/LICENSE +0 -0
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/README.md +0 -0
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/pythonkuma/exceptions.py +0 -0
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/pythonkuma/py.typed +0 -0
- {pythonkuma-0.3.2 → pythonkuma-0.4.0rc0}/pythonkuma/update.py +0 -0
|
@@ -39,17 +39,17 @@ include = [
|
|
|
39
39
|
|
|
40
40
|
[tool.hatch.envs.default]
|
|
41
41
|
dependencies = [
|
|
42
|
-
"ruff==0.
|
|
43
|
-
"aiohttp==3.13.
|
|
44
|
-
"prometheus-client==0.
|
|
45
|
-
"mashumaro==3.
|
|
46
|
-
"mkdocs-material==9.7.
|
|
47
|
-
"mkdocstrings[python]==0.
|
|
42
|
+
"ruff==0.15.0",
|
|
43
|
+
"aiohttp==3.13.3",
|
|
44
|
+
"prometheus-client==0.24.1",
|
|
45
|
+
"mashumaro==3.20",
|
|
46
|
+
"mkdocs-material==9.7.1",
|
|
47
|
+
"mkdocstrings[python]==1.0.3",
|
|
48
48
|
]
|
|
49
49
|
|
|
50
50
|
[tool.hatch.envs.hatch-static-analysis]
|
|
51
51
|
dependencies = [
|
|
52
|
-
"ruff==0.
|
|
52
|
+
"ruff==0.15.0",
|
|
53
53
|
]
|
|
54
54
|
config-path = "none"
|
|
55
55
|
|
|
@@ -48,6 +48,10 @@ class MonitorType(StrEnum):
|
|
|
48
48
|
RABBIT_MQ = "rabbitmq"
|
|
49
49
|
MANUAL = "manual"
|
|
50
50
|
UNKNOWN = "unknown"
|
|
51
|
+
WEBSOCKET_UPGRADE = "websocket-upgrade"
|
|
52
|
+
SYSTEM_SERVICE = "system-service"
|
|
53
|
+
GLOBALPING = "globalping"
|
|
54
|
+
SIP_OPTIONS = "sip-options"
|
|
51
55
|
|
|
52
56
|
@classmethod
|
|
53
57
|
def _missing_(cls, _: object) -> Self:
|
|
@@ -80,6 +84,13 @@ class UptimeKumaMonitor(UptimeKumaBaseModel):
|
|
|
80
84
|
monitor_url: str | None = field(
|
|
81
85
|
metadata={"deserialize": lambda v: None if v == "null" else v}
|
|
82
86
|
)
|
|
87
|
+
monitor_uptime_ratio_1d: float | None = None
|
|
88
|
+
monitor_uptime_ratio_30d: float | None = None
|
|
89
|
+
monitor_uptime_ratio_365d: float | None = None
|
|
90
|
+
|
|
91
|
+
monitor_response_time_seconds_1d: float | None = None
|
|
92
|
+
monitor_response_time_seconds_30d: float | None = None
|
|
93
|
+
monitor_response_time_seconds_365d: float | None = None
|
|
83
94
|
|
|
84
95
|
|
|
85
96
|
@dataclass
|
|
@@ -102,10 +102,14 @@ class UptimeKuma:
|
|
|
102
102
|
else sample.labels["monitor_name"]
|
|
103
103
|
)
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
{sample.name
|
|
105
|
+
name = (
|
|
106
|
+
f"{sample.name}_{window}"
|
|
107
|
+
if (window := sample.labels.get("window"))
|
|
108
|
+
else sample.name
|
|
107
109
|
)
|
|
108
110
|
|
|
111
|
+
monitors.setdefault(key, sample.labels).update({name: sample.value})
|
|
112
|
+
|
|
109
113
|
return {
|
|
110
114
|
key: UptimeKumaMonitor.from_dict(value)
|
|
111
115
|
for key, value in monitors.items()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|