uiprotect 0.14.0__py3-none-any.whl → 0.15.1__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.

Potentially problematic release.


This version of uiprotect might be problematic. Click here for more details.

uiprotect/api.py CHANGED
@@ -11,6 +11,7 @@ import sys
11
11
  import time
12
12
  from collections.abc import Callable
13
13
  from datetime import datetime, timedelta
14
+ from functools import cached_property
14
15
  from http.cookies import Morsel, SimpleCookie
15
16
  from ipaddress import IPv4Address, IPv6Address
16
17
  from pathlib import Path
@@ -749,10 +750,10 @@ class ProtectApiClient(BaseApiClient):
749
750
  def is_ready(self) -> bool:
750
751
  return self._bootstrap is not None
751
752
 
752
- @property
753
+ @cached_property
753
754
  def bootstrap(self) -> Bootstrap:
754
755
  if self._bootstrap is None:
755
- raise BadRequest("Client not initalized, run `update` first")
756
+ raise BadRequest("Client not initialized, run `update` first")
756
757
 
757
758
  return self._bootstrap
758
759
 
@@ -793,6 +794,7 @@ class ProtectApiClient(BaseApiClient):
793
794
  if self._bootstrap is None or now - self._last_update > DEVICE_UPDATE_INTERVAL:
794
795
  bootstrap_updated = True
795
796
  self._bootstrap = await self.get_bootstrap()
797
+ self.__dict__.pop("bootstrap", None)
796
798
  self._last_update = now
797
799
  self._last_update_dt = now_dt
798
800
 
uiprotect/websocket.py CHANGED
@@ -104,7 +104,7 @@ class Websocket:
104
104
  break
105
105
  self._reset_timeout()
106
106
  except ClientError:
107
- _LOGGER.exception("Websocket disconnect error: %s")
107
+ _LOGGER.exception("Websocket disconnect error: %s", self.url)
108
108
  finally:
109
109
  _LOGGER.debug("Websocket disconnected")
110
110
  self._increase_failure()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uiprotect
3
- Version: 0.14.0
3
+ Version: 0.15.1
4
4
  Summary: Python API for Unifi Protect (Unofficial)
5
5
  Home-page: https://github.com/uilibs/uiprotect
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  uiprotect/__init__.py,sha256=llnQNtiBfwQG8IkQXovvFz4LZeFjrJx7XdmmUhu3a9E,289
2
2
  uiprotect/__main__.py,sha256=C_bHCOkv5qj6WMy-6ELoY3Y6HDhLxOa1a30CzmbZhsg,462
3
- uiprotect/api.py,sha256=9NQ8H4AxrGmneTwWo2K2EgFgsm1L5o-2vm7cDJdjWIg,66158
3
+ uiprotect/api.py,sha256=83XjDcYb-Nnc72X77ujGUg4wskugPkPDIm-wFYni_-E,66253
4
4
  uiprotect/cli/__init__.py,sha256=sSLW9keVQOkgFcMW18HTDjRrt9sJ0KWjn9DJDA6f9Pc,8658
5
5
  uiprotect/cli/backup.py,sha256=ZiS7RZnJGKI8TJKLW2cOUzkRM8nyTvE5Ov_jZZGtvSM,36708
6
6
  uiprotect/cli/base.py,sha256=zpTm2kyJe_GLixnv3Uadke__iRLh64AEwQzp-2hqS7g,7730
@@ -29,9 +29,9 @@ uiprotect/stream.py,sha256=McV3XymKyjn-1uV5jdQHcpaDjqLS4zWyMASQ8ubcyb4,4924
29
29
  uiprotect/test_util/__init__.py,sha256=d2g7afa0LSdixQ0kjEDYwafDFME_UlW2LzxpamZ2BC0,18556
30
30
  uiprotect/test_util/anonymize.py,sha256=f-8ijU-_y9r-uAbhIPn0f0I6hzJpAkvJzc8UpWihObI,8478
31
31
  uiprotect/utils.py,sha256=6OLY8hNiCzk418PjJJIlFW7jjPzVt1vxBKEzBSqMeTk,18418
32
- uiprotect/websocket.py,sha256=iMTdchymaCgVHsmY1bRbxkcymqt6WQircIHYNxCu178,7289
33
- uiprotect-0.14.0.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
- uiprotect-0.14.0.dist-info/METADATA,sha256=0Y-f0uuYI6g81m3TwXC102R5wUtTw0VWIlvJQizQ81w,10985
35
- uiprotect-0.14.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
- uiprotect-0.14.0.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
- uiprotect-0.14.0.dist-info/RECORD,,
32
+ uiprotect/websocket.py,sha256=IzDPyqbzrkOMREvahN-e2zdvVD0VABSCWy6jSoCwOT0,7299
33
+ uiprotect-0.15.1.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
34
+ uiprotect-0.15.1.dist-info/METADATA,sha256=t3Ov_3D6efBI2nzif6zeqRPOQND2X25fqIw1SRebTto,10985
35
+ uiprotect-0.15.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
36
+ uiprotect-0.15.1.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
37
+ uiprotect-0.15.1.dist-info/RECORD,,