lucasheld / uptime-kuma-api

A Python wrapper for the Uptime Kuma Socket.IO API
https://uptime-kuma-api.readthedocs.io
MIT License
272 stars 21 forks source link

allow 2.0.0-dev-nightly #74

Open mabed-fr opened 3 months ago

mabed-fr commented 3 months ago

Hello,

can bypass version check ?

>>> api.add_monitor(
...     type=MonitorType.HTTP,
...     name="Google",
...     url="https://google.com"
... )
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 1468, in add_monitor
    data = self._build_monitor_data(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/uptime_kuma_api/api.py", line 813, in _build_monitor_data
    if parse_version(self.version) >= parse_version("1.22"):
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/packaging/version.py", line 56, in parse
    return Version(version)
           ^^^^^^^^^^^^^^^^
  File "/root/.local/share/virtualenvs/uptime-kuma-yMP0JEtU/lib/python3.11/site-packages/packaging/version.py", line 202, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '2.0.0-dev-nightly-20240624080807'