python3-commons 0.23.0__tar.gz → 0.23.1__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.23.0 → python3_commons-0.23.1}/PKG-INFO +1 -1
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/audit.py +1 -1
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/conf.py +4 -5
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/object_storage.py +4 -4
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons.egg-info/PKG-INFO +1 -1
- python3_commons-0.23.1/src/python3_commons.egg-info/scm_version.json +8 -0
- python3_commons-0.23.0/src/python3_commons.egg-info/scm_version.json +0 -8
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.coveragerc +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.devcontainer/Dockerfile +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.devcontainer/devcontainer.json +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.devcontainer/docker-compose.yml +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.env_template +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.github/workflows/checks.yml +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.github/workflows/python-publish.yaml +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.github/workflows/release-on-tag-push.yml +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.gitignore +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.pre-commit-config.yaml +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/.python-version +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/AUTHORS.rst +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/CHANGELOG.rst +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/LICENSE +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/README.md +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/README.rst +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/docs/Makefile +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/docs/_static/.gitignore +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/docs/authors.rst +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/docs/changelog.rst +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/docs/conf.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/docs/index.rst +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/docs/license.rst +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/pyproject.toml +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/setup.cfg +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/api_client.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/async_functools.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/auth.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/cache.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/db/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/db/helpers.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/db/models/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/db/models/auth.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/db/models/common.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/db/models/rbac.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/db/models/users.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/exceptions.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/fs.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/generators.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/helpers.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/log/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/log/filters.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/log/formatters.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/permissions.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/serializers/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/serializers/common.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/serializers/json.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/serializers/msgpack.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/serializers/msgspec.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/soap_client.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons.egg-info/SOURCES.txt +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons.egg-info/dependency_links.txt +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons.egg-info/requires.txt +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons.egg-info/scm_file_list.json +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons.egg-info/top_level.txt +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/integration/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/integration/conftest.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/integration/test_auth.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/integration/test_cache.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/integration/test_osc.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/conftest.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/db/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/db/test_async_session_manager.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/log/__init__.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/log/test_formatters.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/test_async_functools.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/test_audit.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/test_auth.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/test_helpers.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/test_msgpack.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/test_msgspec.py +0 -0
- {python3_commons-0.23.0 → python3_commons-0.23.1}/uv.lock +0 -0
|
@@ -26,7 +26,7 @@ logger = logging.getLogger(__name__)
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
async def write_audit_data(settings: S3Settings, key: str, data: bytes) -> None:
|
|
29
|
-
if settings.
|
|
29
|
+
if settings.s3_secret_access_key:
|
|
30
30
|
try:
|
|
31
31
|
await object_storage.put_object(settings.s3_bucket, f'audit/{key}', io.BytesIO(data), len(data))
|
|
32
32
|
except Exception:
|
|
@@ -84,15 +84,14 @@ class DBSettings(BaseSettings):
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
class S3Settings(BaseSettings):
|
|
87
|
-
|
|
88
|
-
aws_access_key_id: SecretStr | None = None
|
|
89
|
-
aws_secret_access_key: SecretStr | None = None
|
|
90
|
-
|
|
87
|
+
s3_access_key_id: SecretStr | None = None
|
|
91
88
|
s3_addressing_style: Literal['path', 'virtual'] = 'virtual'
|
|
92
|
-
|
|
89
|
+
s3_allow_http: bool = False
|
|
93
90
|
s3_bucket: str | None = None
|
|
94
91
|
s3_bucket_root: str | None = None
|
|
95
92
|
s3_cert_verify: bool = True
|
|
93
|
+
s3_region: str | None = None
|
|
94
|
+
s3_secret_access_key: SecretStr | None = None
|
|
96
95
|
|
|
97
96
|
|
|
98
97
|
settings = CommonSettings()
|
|
@@ -44,16 +44,16 @@ class ObjectStorage(metaclass=SingletonMeta):
|
|
|
44
44
|
def __init__(self, settings: S3Settings) -> None:
|
|
45
45
|
self._session = aiobotocore.session.get_session()
|
|
46
46
|
config = {
|
|
47
|
-
'region_name': settings.
|
|
48
|
-
'use_ssl': settings.
|
|
47
|
+
'region_name': settings.s3_region,
|
|
48
|
+
'use_ssl': settings.s3_allow_http,
|
|
49
49
|
'verify': settings.s3_cert_verify,
|
|
50
50
|
'config': Config(s3={'addressing_style': settings.s3_addressing_style}, signature_version='s3v4'),
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
if aws_access_key_id := settings.
|
|
53
|
+
if aws_access_key_id := settings.s3_access_key_id:
|
|
54
54
|
config['aws_access_key_id'] = aws_access_key_id.get_secret_value()
|
|
55
55
|
|
|
56
|
-
if aws_secret_access_key := settings.
|
|
56
|
+
if aws_secret_access_key := settings.s3_secret_access_key:
|
|
57
57
|
config['aws_secret_access_key'] = aws_secret_access_key.get_secret_value()
|
|
58
58
|
|
|
59
59
|
self._config = config
|
|
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
|
|
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.23.0 → python3_commons-0.23.1}/src/python3_commons/serializers/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/serializers/msgpack.py
RENAMED
|
File without changes
|
{python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons/serializers/msgspec.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{python3_commons-0.23.0 → python3_commons-0.23.1}/src/python3_commons.egg-info/scm_file_list.json
RENAMED
|
File without changes
|
{python3_commons-0.23.0 → python3_commons-0.23.1}/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
|
{python3_commons-0.23.0 → python3_commons-0.23.1}/tests/unit/db/test_async_session_manager.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
|