python3-commons 0.18.9__tar.gz → 0.18.10__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.10}/PKG-INFO +1 -1
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/object_storage.py +14 -13
- {python3_commons-0.18.9 → python3_commons-0.18.10/src/python3_commons.egg-info}/PKG-INFO +1 -1
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.coveragerc +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.devcontainer/Dockerfile +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.devcontainer/devcontainer.json +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.devcontainer/docker-compose.yml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.env_template +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.github/workflows/checks.yml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.github/workflows/python-publish.yaml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.github/workflows/release-on-tag-push.yml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.gitignore +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.pre-commit-config.yaml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/.python-version +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/AUTHORS.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/CHANGELOG.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/LICENSE +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/README.md +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/README.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/docs/Makefile +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/docs/_static/.gitignore +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/docs/authors.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/docs/changelog.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/docs/conf.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/docs/index.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/docs/license.rst +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/pyproject.toml +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/setup.cfg +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/api_client.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/async_functools.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/audit.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/auth.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/cache.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/conf.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/db/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/db/helpers.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/db/models/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/db/models/auth.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/db/models/common.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/db/models/rbac.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/db/models/users.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/exceptions.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/fs.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/generators.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/helpers.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/log/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/log/filters.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/log/formatters.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/permissions.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/serializers/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/serializers/common.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/serializers/json.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/serializers/msgpack.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/serializers/msgspec.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/soap_client.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons.egg-info/SOURCES.txt +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons.egg-info/dependency_links.txt +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons.egg-info/requires.txt +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons.egg-info/top_level.txt +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/integration/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/integration/test_cache.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/integration/test_osc.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/conftest.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/log/__init__.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/log/test_formatters.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/test_async_functools.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/test_audit.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/test_helpers.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/test_msgpack.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/tests/unit/test_msgspec.py +0 -0
- {python3_commons-0.18.9 → python3_commons-0.18.10}/uv.lock +0 -0
|
@@ -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
|
|
|
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.10}/.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
|
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.10}/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.10}/src/python3_commons/serializers/__init__.py
RENAMED
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/serializers/common.py
RENAMED
|
File without changes
|
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons/serializers/msgpack.py
RENAMED
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.10}/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.10}/src/python3_commons.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.10}/src/python3_commons.egg-info/requires.txt
RENAMED
|
File without changes
|
{python3_commons-0.18.9 → python3_commons-0.18.10}/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
|
|
File without changes
|