python3-commons 0.18.9__tar.gz → 0.18.11__tar.gz
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-0.18.9/src/python3_commons.egg-info → python3_commons-0.18.11}/PKG-INFO +2 -2
- {python3_commons-0.18.9 → python3_commons-0.18.11}/pyproject.toml +1 -1
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/object_storage.py +14 -13
- {python3_commons-0.18.9 → python3_commons-0.18.11/src/python3_commons.egg-info}/PKG-INFO +2 -2
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons.egg-info/requires.txt +1 -1
- {python3_commons-0.18.9 → python3_commons-0.18.11}/uv.lock +6 -6
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.coveragerc +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.devcontainer/Dockerfile +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.devcontainer/devcontainer.json +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.devcontainer/docker-compose.yml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.env_template +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.github/workflows/checks.yml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.github/workflows/python-publish.yaml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.github/workflows/release-on-tag-push.yml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.gitignore +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.pre-commit-config.yaml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/.python-version +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/AUTHORS.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/CHANGELOG.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/LICENSE +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/README.md +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/README.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/docs/Makefile +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/docs/_static/.gitignore +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/docs/authors.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/docs/changelog.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/docs/conf.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/docs/index.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/docs/license.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/setup.cfg +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/api_client.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/async_functools.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/audit.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/auth.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/cache.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/conf.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/db/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/db/helpers.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/db/models/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/db/models/auth.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/db/models/common.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/db/models/rbac.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/db/models/users.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/exceptions.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/fs.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/generators.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/helpers.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/log/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/log/filters.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/log/formatters.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/permissions.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/common.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/json.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/msgpack.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/msgspec.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/soap_client.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons.egg-info/SOURCES.txt +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons.egg-info/dependency_links.txt +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons.egg-info/top_level.txt +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/integration/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/integration/test_cache.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/integration/test_osc.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/conftest.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/log/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/log/test_formatters.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/test_async_functools.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/test_audit.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/test_helpers.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/test_msgpack.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.11}/tests/unit/test_msgspec.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-commons
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.11
|
|
4
4
|
Summary: Re-usable Python3 code
|
|
5
5
|
Author-email: Oleg Korsak <kamikaze.is.waiting.you@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0
|
|
@@ -39,7 +39,7 @@ Requires-Dist: asyncpg~=0.31.0; extra == "database"
|
|
|
39
39
|
Requires-Dist: SQLAlchemy[asyncio]~=2.0.49; extra == "database"
|
|
40
40
|
Provides-Extra: object-storage
|
|
41
41
|
Requires-Dist: aiobotocore~=3.6.0; extra == "object-storage"
|
|
42
|
-
Requires-Dist: object-storage-client==0.0.
|
|
42
|
+
Requires-Dist: object-storage-client==0.0.26; extra == "object-storage"
|
|
43
43
|
Provides-Extra: soap-client
|
|
44
44
|
Requires-Dist: aiohttp[speedups]<3.15.0,>=3.13.5; extra == "soap-client"
|
|
45
45
|
Requires-Dist: certifi==2026.4.22; extra == "soap-client"
|
|
@@ -140,7 +140,7 @@ async def list_objects(bucket_name: str, prefix: str, *, recursive: bool = True)
|
|
|
140
140
|
|
|
141
141
|
|
|
142
142
|
async def get_object_streams(
|
|
143
|
-
|
|
143
|
+
bucket_name: str, path: str, *, recursive: bool = True
|
|
144
144
|
) -> AsyncGenerator[tuple[str, datetime, StreamingBody]]:
|
|
145
145
|
async for obj in list_objects(bucket_name, path, recursive=recursive):
|
|
146
146
|
object_name = obj['Key']
|
|
@@ -151,7 +151,7 @@ async def get_object_streams(
|
|
|
151
151
|
|
|
152
152
|
|
|
153
153
|
async def get_objects(
|
|
154
|
-
|
|
154
|
+
bucket_name: str, path: str, *, recursive: bool = True
|
|
155
155
|
) -> AsyncGenerator[tuple[str, datetime, bytes]]:
|
|
156
156
|
async for object_name, last_modified, stream in get_object_streams(bucket_name, path, recursive=recursive):
|
|
157
157
|
data = await stream.read()
|
|
@@ -159,21 +159,22 @@ async def get_objects(
|
|
|
159
159
|
yield object_name, last_modified, data
|
|
160
160
|
|
|
161
161
|
|
|
162
|
-
async def remove_object(bucket_name: str,
|
|
163
|
-
storage
|
|
162
|
+
async def remove_object(bucket_name: str, path: str) -> None:
|
|
163
|
+
logger.debug('Removing object from object storage: %s:%s', bucket_name, path)
|
|
164
164
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
165
|
+
try:
|
|
166
|
+
client = get_client()
|
|
167
|
+
absolute_path = get_absolute_path(path)
|
|
168
|
+
url = f's3://{bucket_name}/{absolute_path}'
|
|
169
|
+
await client.remove_object(url)
|
|
170
|
+
except Exception as e:
|
|
171
|
+
logger.exception('Failed to remove object from object storage: %s:%s', bucket_name, path, exc_info=e)
|
|
171
172
|
|
|
172
|
-
|
|
173
|
+
raise
|
|
173
174
|
|
|
174
175
|
|
|
175
176
|
async def remove_objects(
|
|
176
|
-
|
|
177
|
+
bucket_name: str, prefix: str | None = None, object_names: Iterable[str] | None = None
|
|
177
178
|
) -> Sequence[Mapping] | None:
|
|
178
179
|
storage = ObjectStorage(s3_settings)
|
|
179
180
|
|
|
@@ -196,7 +197,7 @@ async def remove_objects(
|
|
|
196
197
|
chunk_size = 1000
|
|
197
198
|
|
|
198
199
|
for i in range(0, len(objects_to_delete), chunk_size):
|
|
199
|
-
chunk = objects_to_delete[i
|
|
200
|
+
chunk = objects_to_delete[i: i + chunk_size]
|
|
200
201
|
|
|
201
202
|
response = await s3_client.delete_objects(Bucket=bucket_name, Delete={'Objects': chunk})
|
|
202
203
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python3-commons
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.11
|
|
4
4
|
Summary: Re-usable Python3 code
|
|
5
5
|
Author-email: Oleg Korsak <kamikaze.is.waiting.you@gmail.com>
|
|
6
6
|
License-Expression: GPL-3.0
|
|
@@ -39,7 +39,7 @@ Requires-Dist: asyncpg~=0.31.0; extra == "database"
|
|
|
39
39
|
Requires-Dist: SQLAlchemy[asyncio]~=2.0.49; extra == "database"
|
|
40
40
|
Provides-Extra: object-storage
|
|
41
41
|
Requires-Dist: aiobotocore~=3.6.0; extra == "object-storage"
|
|
42
|
-
Requires-Dist: object-storage-client==0.0.
|
|
42
|
+
Requires-Dist: object-storage-client==0.0.26; extra == "object-storage"
|
|
43
43
|
Provides-Extra: soap-client
|
|
44
44
|
Requires-Dist: aiohttp[speedups]<3.15.0,>=3.13.5; extra == "soap-client"
|
|
45
45
|
Requires-Dist: certifi==2026.4.22; extra == "soap-client"
|
|
@@ -717,13 +717,13 @@ wheels = [
|
|
|
717
717
|
|
|
718
718
|
[[package]]
|
|
719
719
|
name = "object-storage-client"
|
|
720
|
-
version = "0.0.
|
|
720
|
+
version = "0.0.26"
|
|
721
721
|
source = { registry = "https://pypi.org/simple" }
|
|
722
|
-
sdist = { url = "https://files.pythonhosted.org/packages/
|
|
722
|
+
sdist = { url = "https://files.pythonhosted.org/packages/b3/29/ffd4b0ac2edc22b6ff152c84d6b4dbf2cb9bfd63a56c0e754a05275eeec7/object_storage_client-0.0.26.tar.gz", hash = "sha256:0b1d2c14fcedc40b570d146099093876d2a4687397f1e10026aa78a625bf4731", size = 41789, upload-time = "2026-05-06T13:00:30.294Z" }
|
|
723
723
|
wheels = [
|
|
724
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
725
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
726
|
-
{ url = "https://files.pythonhosted.org/packages/
|
|
724
|
+
{ url = "https://files.pythonhosted.org/packages/02/b6/68dd1289550615c2108ba6d0e3b8898a4b0b797db53d22bdf0af7cb974b8/object_storage_client-0.0.26-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:15946756649a79b7e1cce4d0bfcb0d8a0b0e61de23b8b0c760174848e3acd33f", size = 1945407, upload-time = "2026-05-06T13:00:24.829Z" },
|
|
725
|
+
{ url = "https://files.pythonhosted.org/packages/d4/34/c36d11465cfcdca40b8389267ceedce28c623e84d74d1d7a2b5cddf70622/object_storage_client-0.0.26-cp314-cp314-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:40cf561fa56555510c1f68f25ae3a1ff67599492218b523ec5b8ce97c42e57ad", size = 2133216, upload-time = "2026-05-06T13:00:26.831Z" },
|
|
726
|
+
{ url = "https://files.pythonhosted.org/packages/ff/b1/58e884f24cbfc23866a38ccd658a5c7438dae0ea68fbdcf4806419058a7c/object_storage_client-0.0.26-cp314-cp314-win_amd64.whl", hash = "sha256:7fa8d933668b619b60bee70cdeba270ac4d48653836b4323fc28b3d097c978f3", size = 2131434, upload-time = "2026-05-06T13:00:28.494Z" },
|
|
727
727
|
]
|
|
728
728
|
|
|
729
729
|
[[package]]
|
|
@@ -1135,7 +1135,7 @@ requires-dist = [
|
|
|
1135
1135
|
{ name = "lxml", marker = "extra == 'soap-client'", specifier = "~=6.1.0" },
|
|
1136
1136
|
{ name = "msgpack", specifier = "~=1.1.2" },
|
|
1137
1137
|
{ name = "msgspec", specifier = "==0.21.1" },
|
|
1138
|
-
{ name = "object-storage-client", marker = "extra == 'object-storage'", specifier = "==0.0.
|
|
1138
|
+
{ name = "object-storage-client", marker = "extra == 'object-storage'", specifier = "==0.0.26" },
|
|
1139
1139
|
{ name = "pydantic-settings", specifier = "~=2.14.0" },
|
|
1140
1140
|
{ name = "python3-commons", extras = ["api-client"], marker = "extra == 'authn'" },
|
|
1141
1141
|
{ name = "python3-commons", extras = ["api-client"], marker = "extra == 'authz'" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.11}/.github/workflows/release-on-tag-push.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/db/models/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/__init__.py
RENAMED
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/common.py
RENAMED
|
File without changes
|
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/msgpack.py
RENAMED
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons/serializers/msgspec.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.11}/src/python3_commons.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|