pythonkuma 0.5.2__py3-none-any.whl → 0.5.3__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.
pythonkuma/__init__.py CHANGED
@@ -11,7 +11,7 @@ from .models import MonitorStatus, MonitorType, UptimeKumaMonitor, UptimeKumaVer
11
11
  from .update import UpdateChecker
12
12
  from .uptimekuma import UptimeKuma
13
13
 
14
- __version__ = "0.5.2"
14
+ __version__ = "0.5.3"
15
15
 
16
16
  __all__ = [
17
17
  "MonitorStatus",
pythonkuma/models.py CHANGED
@@ -31,6 +31,7 @@ class MonitorType(StrEnum):
31
31
  SYSTEM_SERVICE = "system-service"
32
32
  PM2 = "pm2"
33
33
  REAL_BROWSER = "real-browser"
34
+ SFTP = "sftp"
34
35
  # Special
35
36
  GROUP = "group"
36
37
  # Passive monitor type
@@ -64,7 +65,7 @@ class MonitorType(StrEnum):
64
65
  UNKNOWN = "unknown"
65
66
 
66
67
  @classmethod
67
- def _missing_(cls, _: object) -> Self:
68
+ def _missing_(cls, value: object) -> Self: # noqa: ARG003
68
69
  """Handle new and unknown monitor types."""
69
70
  return cls.UNKNOWN
70
71
 
pythonkuma/uptimekuma.py CHANGED
@@ -4,11 +4,11 @@ from http import HTTPStatus
4
4
  from typing import Any
5
5
 
6
6
  from aiohttp import (
7
- BasicAuth,
8
7
  ClientError,
9
8
  ClientResponseError,
10
9
  ClientSession,
11
10
  ClientTimeout,
11
+ encode_basic_auth,
12
12
  )
13
13
  from prometheus_client.parser import text_string_to_metric_families
14
14
  from yarl import URL
@@ -56,7 +56,9 @@ class UptimeKuma:
56
56
  """
57
57
  self._base_url = base_url if isinstance(base_url, URL) else URL(base_url)
58
58
 
59
- self._auth = BasicAuth("", api_key) if api_key else None
59
+ self._headers = (
60
+ {"Authorization": encode_basic_auth("", api_key)} if api_key else None
61
+ )
60
62
 
61
63
  self._timeout = ClientTimeout(total=timeout or 10)
62
64
  self._session = session
@@ -89,7 +91,7 @@ class UptimeKuma:
89
91
 
90
92
  try:
91
93
  request = await self._session.get(
92
- url, auth=self._auth, timeout=self._timeout
94
+ url, headers=self._headers, timeout=self._timeout
93
95
  )
94
96
  request.raise_for_status()
95
97
  except ClientResponseError as e:
@@ -1,16 +1,16 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: pythonkuma
3
- Version: 0.5.2
3
+ Version: 0.5.3
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
7
- Author-email: Manfred Dennerlein Rodelo <manfred@dennerlein.name>, Jayakorn Karikan <jayakornk@gmail.com>
7
+ Author-email: Manfred Dennerlein Rodelo <tr4nt0r@uber.space>
8
8
  License-Expression: MIT
9
9
  License-File: LICENSE
10
10
  Classifier: Operating System :: OS Independent
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Requires-Python: >=3.12
13
- Requires-Dist: aiohttp>=3.12.9
13
+ Requires-Dist: aiohttp>=3.14.0
14
14
  Requires-Dist: mashumaro>=3.13.1
15
15
  Requires-Dist: prometheus-client>=0.21.0
16
16
  Description-Content-Type: text/markdown
@@ -87,7 +87,7 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
87
87
 
88
88
  ## ❤️ Support
89
89
 
90
- If you find this project useful, consider [buying me a coffee ☕](https://www.buymeacoffee.com/tr4nt0r) or [sponsoring me on GitHub](https://github.com/sponsors/tr4nt0r)!
90
+ If you find this project useful, consider sponsoring me on [GitHub](https://github.com/sponsors/tr4nt0r)!
91
91
 
92
92
  ---
93
93
 
@@ -0,0 +1,10 @@
1
+ pythonkuma/__init__.py,sha256=seHbhdjyVi4DXRKPEFzsQWnlFO_bJ7w_ITWQSloRYIo,702
2
+ pythonkuma/exceptions.py,sha256=pm7uchh_QWQkpzCo5yMKpNqffsoakcQnkqhQjQ3bjfk,559
3
+ pythonkuma/models.py,sha256=mriJ2PMlpgiaHrsUNuwI4Sk8pjyrCpQrUzGAfcmJsoo,2907
4
+ pythonkuma/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ pythonkuma/update.py,sha256=RPkUpZvSvAiyb1hqyGgybDr3_xmiq5wNSrjf31XbtU4,1511
6
+ pythonkuma/uptimekuma.py,sha256=UdUZhK06hBI-8c8kpYtyURTQnebai4CscE75ljFVDSQ,4701
7
+ pythonkuma-0.5.3.dist-info/METADATA,sha256=9tiuTjnnb_fSGLNhQGuFerjvUeXxoVAoOnzHASZfoAs,2484
8
+ pythonkuma-0.5.3.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
9
+ pythonkuma-0.5.3.dist-info/licenses/LICENSE,sha256=56v4vFymsEXiSGB83AEdGLV698yzOXB_5CBtRSUoD5I,1082
10
+ pythonkuma-0.5.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.31.0
2
+ Generator: hatchling 1.32.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,10 +0,0 @@
1
- pythonkuma/__init__.py,sha256=fsmnI0z9p44uhunXmB3NZ1IVmYW3oXupfUdG5OWh1RY,702
2
- pythonkuma/exceptions.py,sha256=pm7uchh_QWQkpzCo5yMKpNqffsoakcQnkqhQjQ3bjfk,559
3
- pythonkuma/models.py,sha256=HE6cjQat-w8Ldvq1L2d2qJgn7D9XLaZLx1VeJjq989s,2869
4
- pythonkuma/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- pythonkuma/update.py,sha256=RPkUpZvSvAiyb1hqyGgybDr3_xmiq5wNSrjf31XbtU4,1511
6
- pythonkuma/uptimekuma.py,sha256=swldSPdE3UFVxSCh7bm3_x7eMu-9W1uMJrxtTeyWmF8,4633
7
- pythonkuma-0.5.2.dist-info/METADATA,sha256=mXLA8Cr0yWggYS5cBjxRfnrGzXMGIVysE-OJz9lvxTU,2595
8
- pythonkuma-0.5.2.dist-info/WHEEL,sha256=lCkmxWfQsSc9CfIClYeavTdQeEX2toPqufh9gI35EQA,87
9
- pythonkuma-0.5.2.dist-info/licenses/LICENSE,sha256=56v4vFymsEXiSGB83AEdGLV698yzOXB_5CBtRSUoD5I,1082
10
- pythonkuma-0.5.2.dist-info/RECORD,,