casambi-bt-revamped 0.3.9__py3-none-any.whl → 0.3.11__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.
CasambiBt/_cache.py CHANGED
@@ -6,28 +6,28 @@ import shutil
6
6
  from types import TracebackType
7
7
  from typing import Final
8
8
 
9
- from aiopath import AsyncPath # type: ignore
9
+ from anyio import Path
10
10
 
11
11
  _LOGGER = logging.getLogger(__name__)
12
12
 
13
- CACHE_PATH_DEFAULT: Final = AsyncPath(os.getcwd()) / "casambi-bt-store"
13
+ CACHE_PATH_DEFAULT: Final = Path(os.getcwd()) / "casambi-bt-store"
14
14
  CACHE_VERSION: Final = 2
15
15
 
16
- # We need a global lock since there could be multiple Caambi instances
16
+ # We need a global lock since there could be multiple Casambi instances
17
17
  # with their own cache instances pointing to the same folder.
18
18
  _cacheLock = asyncio.Lock()
19
19
 
20
20
 
21
- def _blocking_delete(path: AsyncPath) -> None:
21
+ def _blocking_delete(path: Path) -> None:
22
22
  shutil.rmtree(pathlib.Path(path))
23
23
 
24
24
 
25
25
  class Cache:
26
- def __init__(self, cachePath: AsyncPath | pathlib.Path | None) -> None:
26
+ def __init__(self, cachePath: Path | pathlib.Path | None) -> None:
27
27
  if cachePath is None:
28
28
  self._cachePath = CACHE_PATH_DEFAULT
29
- elif not isinstance(cachePath, AsyncPath):
30
- self._cachePath = AsyncPath(cachePath)
29
+ elif not isinstance(cachePath, Path):
30
+ self._cachePath = Path(cachePath)
31
31
  else:
32
32
  self._cachePath = cachePath
33
33
 
@@ -69,7 +69,7 @@ class Cache:
69
69
  await self._cachePath.mkdir(mode=0o700)
70
70
  await self._cacheVersionFile.write_text(str(CACHE_VERSION))
71
71
 
72
- async def __aenter__(self) -> AsyncPath:
72
+ async def __aenter__(self) -> Path:
73
73
  await _cacheLock.acquire()
74
74
 
75
75
  if self._uuid is None:
@@ -78,7 +78,7 @@ class Cache:
78
78
  try:
79
79
  await self._ensureCacheValid()
80
80
 
81
- cacheDir = AsyncPath(self._cachePath / self._uuid)
81
+ cacheDir = Path(self._cachePath / self._uuid)
82
82
  if not await cacheDir.exists():
83
83
  _LOGGER.debug("Creating cache entry for id %s", self._uuid)
84
84
  await cacheDir.mkdir()
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: casambi-bt-revamped
3
- Version: 0.3.9
4
- Summary: Enhanced Casambi Bluetooth client library with switch event support
3
+ Version: 0.3.11
4
+ Summary: Forked Casambi Bluetooth client library with switch event support, use original if no special need. https://github.com/lkempf/casambi-bt
5
5
  Home-page: https://github.com/rankjie/casambi-bt
6
6
  Author: rankjie
7
7
  Author-email: rankjie@gmail.com
@@ -12,19 +12,19 @@ Classifier: Development Status :: 4 - Beta
12
12
  Requires-Python: >=3.11
13
13
  Description-Content-Type: text/markdown
14
14
  License-File: LICENSE
15
- Requires-Dist: bleak>=2.1.0
15
+ Requires-Dist: bleak!=2.0.0,>=0.22
16
16
  Requires-Dist: cryptography>=40.0.0
17
17
  Requires-Dist: httpx>=0.25
18
18
  Requires-Dist: bleak_retry_connector>=3.6.0
19
- Requires-Dist: aiopath==0.7.*
19
+ Requires-Dist: anyio>=4.10.0
20
20
  Dynamic: license-file
21
21
 
22
22
  ![PyPI](https://img.shields.io/pypi/v/casambi-bt-revamped)
23
23
  [![Discord](https://img.shields.io/discord/1186445089317326888)](https://discord.gg/jgZVugfx)
24
24
 
25
- # Casambi Bluetooth Revamped - Enhanced Python library for Casambi networks
25
+ # Casambi Bluetooth Revamped - Python library for Casambi networks
26
26
 
27
- This is an enhanced fork of the original [casambi-bt](https://github.com/lkempf/casambi-bt) library with additional features:
27
+ This is a customized fork of the original [casambi-bt](https://github.com/lkempf/casambi-bt) library with additional features and should only be used for special needs:
28
28
 
29
29
  - **Switch event support** - Receive button press/release events from Casambi switches
30
30
  - **Improved relay status handling** - Better support for relay units
@@ -1,5 +1,5 @@
1
1
  CasambiBt/__init__.py,sha256=TW445xSu5PV3TyMjJfwaA1JoWvQQ8LXhZgGdDTfWf3s,302
2
- CasambiBt/_cache.py,sha256=KZ2xbiHAHXUPa8Gw_75Nw9NL4QSY_sTWHbyYXYUDaB0,3865
2
+ CasambiBt/_cache.py,sha256=3bQil8vhSy4f4sf9JusMfEdQC7d3cJuva9qHhyKro-0,3808
3
3
  CasambiBt/_casambi.py,sha256=AfyuzEU2ylJOGLmZ87Qft-aNXI_JK8Ng9Tfk4fWYOwo,34345
4
4
  CasambiBt/_client.py,sha256=cmRXPxURJpp8xQM-FJe2NBMtfFFC7NnWExTaN65LQ5c,32142
5
5
  CasambiBt/_constants.py,sha256=_AxkG7Btxl4VeS6mO7GJW5Kc9dFs3s9sDmtJ83ZEKNw,359
@@ -11,8 +11,8 @@ CasambiBt/_operation.py,sha256=Q5UccsrtNp_B_wWqwH_3eLFW_yF6A55FMmfUKDk2WrI,1059
11
11
  CasambiBt/_unit.py,sha256=KR_dvVhCH8WIPGJgZYHyAPVA6ru0KmMOL5NgkxYHIUQ,17042
12
12
  CasambiBt/errors.py,sha256=0JgDjaKlAKDes0poWzA8nrTUYQ8qdNfBb8dfaqqzCRA,1664
13
13
  CasambiBt/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- casambi_bt_revamped-0.3.9.dist-info/licenses/LICENSE,sha256=TAIIitFxpxEDi6Iju7foW4TDQmWvC-IhLVLhl67jKmQ,11341
15
- casambi_bt_revamped-0.3.9.dist-info/METADATA,sha256=gZzMScOl8A22GnaSMjFoAwu1Q2kJWwF49GQXcQFd0pk,3044
16
- casambi_bt_revamped-0.3.9.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
17
- casambi_bt_revamped-0.3.9.dist-info/top_level.txt,sha256=uNbqLjtecFosoFzpGAC89-5icikWODKI8rOjbi8v_sA,10
18
- casambi_bt_revamped-0.3.9.dist-info/RECORD,,
14
+ casambi_bt_revamped-0.3.11.dist-info/licenses/LICENSE,sha256=TAIIitFxpxEDi6Iju7foW4TDQmWvC-IhLVLhl67jKmQ,11341
15
+ casambi_bt_revamped-0.3.11.dist-info/METADATA,sha256=iZGwjYA0uCljUzih5kyGU63Fj-EZIE-acg7wE5fWHwM,3154
16
+ casambi_bt_revamped-0.3.11.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
17
+ casambi_bt_revamped-0.3.11.dist-info/top_level.txt,sha256=uNbqLjtecFosoFzpGAC89-5icikWODKI8rOjbi8v_sA,10
18
+ casambi_bt_revamped-0.3.11.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.10.1)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5