python3-commons 0.8.11__py3-none-any.whl → 0.8.13__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.
- python3_commons/cache.py +14 -3
- {python3_commons-0.8.11.dist-info → python3_commons-0.8.13.dist-info}/METADATA +3 -3
- {python3_commons-0.8.11.dist-info → python3_commons-0.8.13.dist-info}/RECORD +7 -7
- {python3_commons-0.8.11.dist-info → python3_commons-0.8.13.dist-info}/WHEEL +0 -0
- {python3_commons-0.8.11.dist-info → python3_commons-0.8.13.dist-info}/licenses/AUTHORS.rst +0 -0
- {python3_commons-0.8.11.dist-info → python3_commons-0.8.13.dist-info}/licenses/LICENSE +0 -0
- {python3_commons-0.8.11.dist-info → python3_commons-0.8.13.dist-info}/top_level.txt +0 -0
python3_commons/cache.py
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
import logging
|
2
2
|
import socket
|
3
3
|
from platform import platform
|
4
|
-
from typing import Any, Mapping, Sequence
|
4
|
+
from typing import Any, Mapping, Sequence, Union
|
5
5
|
|
6
6
|
import valkey
|
7
7
|
from pydantic import RedisDsn
|
8
8
|
from valkey.asyncio import Valkey, StrictValkey, ConnectionPool, Sentinel
|
9
9
|
from valkey.asyncio.retry import Retry
|
10
10
|
from valkey.backoff import FullJitterBackoff
|
11
|
+
from valkey.typing import ResponseT, PatternT
|
11
12
|
|
12
13
|
from python3_commons.conf import valkey_settings
|
13
14
|
from python3_commons.helpers import SingletonMeta
|
@@ -74,8 +75,18 @@ def get_valkey_client() -> Valkey:
|
|
74
75
|
return AsyncValkeyClient(valkey_settings.dsn, valkey_settings.sentinel_dsn).get_client()
|
75
76
|
|
76
77
|
|
77
|
-
async def
|
78
|
-
|
78
|
+
async def scan(
|
79
|
+
cursor: int = 0,
|
80
|
+
match: bytes | str | memoryview | None = None,
|
81
|
+
count: int | None = None,
|
82
|
+
_type: str | None = None,
|
83
|
+
**kwargs,
|
84
|
+
) -> ResponseT:
|
85
|
+
return await get_valkey_client().scan(cursor, match, count, _type, **kwargs)
|
86
|
+
|
87
|
+
|
88
|
+
async def delete(*names: str | bytes | memoryview):
|
89
|
+
await get_valkey_client().delete(*names)
|
79
90
|
|
80
91
|
|
81
92
|
async def store_bytes(name: str, data: bytes, ttl: int = None, if_not_set: bool = False):
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: python3-commons
|
3
|
-
Version: 0.8.
|
3
|
+
Version: 0.8.13
|
4
4
|
Summary: Re-usable Python3 code
|
5
5
|
Author-email: Oleg Korsak <kamikaze.is.waiting.you@gmail.com>
|
6
6
|
License: gpl-3
|
@@ -12,7 +12,7 @@ Requires-Python: >=3.13
|
|
12
12
|
Description-Content-Type: text/x-rst
|
13
13
|
License-File: LICENSE
|
14
14
|
License-File: AUTHORS.rst
|
15
|
-
Requires-Dist: aiohttp[speedups]~=3.11.
|
15
|
+
Requires-Dist: aiohttp[speedups]~=3.11.16
|
16
16
|
Requires-Dist: asyncpg~=0.30.0
|
17
17
|
Requires-Dist: fastapi-users-db-sqlalchemy~=7.0.0
|
18
18
|
Requires-Dist: fastapi-users[sqlalchemy]~=14.0.1
|
@@ -20,7 +20,7 @@ Requires-Dist: lxml~=5.3.1
|
|
20
20
|
Requires-Dist: minio~=7.2.15
|
21
21
|
Requires-Dist: msgpack~=1.1.0
|
22
22
|
Requires-Dist: msgspec~=0.19.0
|
23
|
-
Requires-Dist: pydantic[email]~=2.11.
|
23
|
+
Requires-Dist: pydantic[email]~=2.11.2
|
24
24
|
Requires-Dist: pydantic-settings~=2.8.1
|
25
25
|
Requires-Dist: SQLAlchemy[asyncio]~=2.0.40
|
26
26
|
Requires-Dist: valkey[libvalkey]~=6.1.0
|
@@ -1,7 +1,7 @@
|
|
1
1
|
python3_commons/__init__.py,sha256=0KgaYU46H_IMKn-BuasoRN3C4Hi45KlkHHoPbU9cwiA,189
|
2
2
|
python3_commons/api_client.py,sha256=zj6zTF-DhUMu4bjj9VWLi63mVODG_SB47Q5qlmG-Sxg,4539
|
3
3
|
python3_commons/audit.py,sha256=DMQ-nrWSs0qilD7wkz_8PV4jXcee75O8FgAm2YIuOiY,6256
|
4
|
-
python3_commons/cache.py,sha256=
|
4
|
+
python3_commons/cache.py,sha256=M8tgp47C-xpQ0Pynz4ob58OwWdQMl0B-ReyxYpSCrU8,7693
|
5
5
|
python3_commons/conf.py,sha256=Vu6eZ8uHiKFHe3OLdtImrUZe5JH4KH7HULwF5M4kY8U,1232
|
6
6
|
python3_commons/fs.py,sha256=wfLjybXndwLqNlOxTpm_HRJnuTcC4wbrHEOaEeCo9Wc,337
|
7
7
|
python3_commons/helpers.py,sha256=OmuCF7UeJ6oe-rH1Y4ZYVW_uPQ973lCLsikj01wmNqs,3101
|
@@ -20,9 +20,9 @@ python3_commons/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
20
20
|
python3_commons/serializers/json.py,sha256=P288wWz9ic38QWEMrpp_uwKPYkQiOgvE1cI4WZn6ZCg,808
|
21
21
|
python3_commons/serializers/msgpack.py,sha256=tzIGGyDL3UpZnnouCtnxuYDx6InKM_C3PP1N4PN8wd4,1269
|
22
22
|
python3_commons/serializers/msgspec.py,sha256=FuZVqOLJb0-lEKrs7dtjhwEbHIpfMUk5yu1hD64zRdc,2038
|
23
|
-
python3_commons-0.8.
|
24
|
-
python3_commons-0.8.
|
25
|
-
python3_commons-0.8.
|
26
|
-
python3_commons-0.8.
|
27
|
-
python3_commons-0.8.
|
28
|
-
python3_commons-0.8.
|
23
|
+
python3_commons-0.8.13.dist-info/licenses/AUTHORS.rst,sha256=3R9JnfjfjH5RoPWOeqKFJgxVShSSfzQPIrEr1nxIo9Q,90
|
24
|
+
python3_commons-0.8.13.dist-info/licenses/LICENSE,sha256=xxILuojHm4fKQOrMHPSslbyy6WuKAN2RiG74HbrYfzM,34575
|
25
|
+
python3_commons-0.8.13.dist-info/METADATA,sha256=Up3ahCYqOzuvdOe7B6wfc04P2k8nn6y6NQWhLNiwBSc,1190
|
26
|
+
python3_commons-0.8.13.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
27
|
+
python3_commons-0.8.13.dist-info/top_level.txt,sha256=lJI6sCBf68eUHzupCnn2dzG10lH3jJKTWM_hrN1cQ7M,16
|
28
|
+
python3_commons-0.8.13.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|