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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythonkuma
3
- Version: 0.3.2
3
+ Version: 0.4.0rc0
4
4
  Summary: Simple Python wrapper for Uptime Kuma
5
5
  Project-URL: Source, https://github.com/tr4nt0r/pythonkuma
6
6
  Project-URL: Documentation, https://tr4nt0r.github.io/pythonkuma
@@ -39,17 +39,17 @@ include = [
39
39
 
40
40
  [tool.hatch.envs.default]
41
41
  dependencies = [
42
- "ruff==0.14.5",
43
- "aiohttp==3.13.2",
44
- "prometheus-client==0.23.1",
45
- "mashumaro==3.17",
46
- "mkdocs-material==9.7.0",
47
- "mkdocstrings[python]==0.30.1",
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.14.5",
52
+ "ruff==0.15.0",
53
53
  ]
54
54
  config-path = "none"
55
55
 
@@ -10,7 +10,7 @@ from .models import MonitorStatus, MonitorType, UptimeKumaMonitor, UptimeKumaVer
10
10
  from .update import UpdateChecker
11
11
  from .uptimekuma import UptimeKuma
12
12
 
13
- __version__ = "0.3.2"
13
+ __version__ = "0.4.0rc0"
14
14
 
15
15
  __all__ = [
16
16
  "MonitorStatus",
@@ -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
- monitors.setdefault(key, sample.labels).update(
106
- {sample.name: sample.value}
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