python3-commons 0.9.2__py3-none-any.whl → 0.9.4__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/conf.py CHANGED
@@ -1,3 +1,5 @@
1
+ from typing import Literal
2
+
1
3
  from pydantic import Field, HttpUrl, PostgresDsn, RedisDsn, SecretStr, model_validator
2
4
  from pydantic_settings import BaseSettings, SettingsConfigDict
3
5
 
@@ -66,6 +68,7 @@ class S3Settings(BaseSettings):
66
68
  s3_region_name: str | None = None
67
69
  s3_access_key_id: SecretStr = SecretStr('')
68
70
  s3_secret_access_key: SecretStr = SecretStr('')
71
+ s3_addressing_style: Literal['path', 'virtual'] = 'virtual'
69
72
  s3_secure: bool = True
70
73
  s3_bucket: str | None = None
71
74
  s3_bucket_root: str | None = None
@@ -32,7 +32,7 @@ class ObjectStorage(metaclass=SingletonMeta):
32
32
  'aws_secret_access_key': settings.s3_secret_access_key.get_secret_value(),
33
33
  'use_ssl': settings.s3_secure,
34
34
  'verify': settings.s3_cert_verify,
35
- 'config': Config(signature_version='s3v4'),
35
+ 'config': Config(s3={'addressing_style': settings.s3_addressing_style}, signature_version='s3v4'),
36
36
  }
37
37
 
38
38
  @asynccontextmanager
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python3-commons
3
- Version: 0.9.2
3
+ Version: 0.9.4
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
@@ -3,10 +3,10 @@ python3_commons/api_client.py,sha256=LT7_YmnYVHK2ucKxIhUJCZrmxgfy-lfOxx08-R0WvW0
3
3
  python3_commons/audit.py,sha256=-jYGjkQ2r8rg3gj-C-5uTQ1lXhK3dRXkktonZxOs1PM,5994
4
4
  python3_commons/auth.py,sha256=vVaiJ5MHUMSbiLF6TIxe4dqVPhBlLttf940jjODL3a4,2934
5
5
  python3_commons/cache.py,sha256=lf27LTD4Z9Iqi5GaK8jH8UC0cL9sHH8wicZ88YDp6Mg,7725
6
- python3_commons/conf.py,sha256=K3GuXDp7iopHms_E-rNR4OzTBIoWSEZmMwRjxKYltTk,2305
6
+ python3_commons/conf.py,sha256=DYFA2_n7W40MBbpaNWv4iTWh7-GPsGU6Ilygz32tHhs,2397
7
7
  python3_commons/fs.py,sha256=wfLjybXndwLqNlOxTpm_HRJnuTcC4wbrHEOaEeCo9Wc,337
8
8
  python3_commons/helpers.py,sha256=qSBQ1A02BEmIY8UPJkCoO28aZq0BPsMg6AGW9k-CThM,3166
9
- python3_commons/object_storage.py,sha256=N_3pMZteACWwYWNVFQsniiyhbLg29zjw2ifdUmJy2gw,6386
9
+ python3_commons/object_storage.py,sha256=4-nWfcYF9Uj6bx3aVM6a4P5Ac2fFCTEaDfejDzn63Qk,6441
10
10
  python3_commons/permissions.py,sha256=bhjTp-tq-oaTGFMHNnSBlcVX5XQCTL0nWcu6SdPEAB4,1555
11
11
  python3_commons/db/__init__.py,sha256=5nArsGm17e-pelpOwAeBKy2n_Py20XqklZsNgkcJ-DQ,2947
12
12
  python3_commons/db/helpers.py,sha256=PY0h08aLiGx-J54wmP3GHPCgGCcLd60rayAUnR3aWdI,1742
@@ -21,9 +21,9 @@ python3_commons/serializers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
21
21
  python3_commons/serializers/json.py,sha256=91UaXLGKGj0yPyrnuMeNrkG2GuPUgcgAsmIokUgEwpU,808
22
22
  python3_commons/serializers/msgpack.py,sha256=WrvaPE187shSK8zkH4UHHMimEZNMv9RaDSwsBE2HlCw,1269
23
23
  python3_commons/serializers/msgspec.py,sha256=0AliXlEl5sewi0UENjI8St5ZScXE5DNRERKzqWKy2Ps,2674
24
- python3_commons-0.9.2.dist-info/licenses/AUTHORS.rst,sha256=3R9JnfjfjH5RoPWOeqKFJgxVShSSfzQPIrEr1nxIo9Q,90
25
- python3_commons-0.9.2.dist-info/licenses/LICENSE,sha256=xxILuojHm4fKQOrMHPSslbyy6WuKAN2RiG74HbrYfzM,34575
26
- python3_commons-0.9.2.dist-info/METADATA,sha256=ZqaPZ4wwFIWs5m3YtVpvZWdSOl7Dcyo2GPHYgpGUHWk,1133
27
- python3_commons-0.9.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
- python3_commons-0.9.2.dist-info/top_level.txt,sha256=lJI6sCBf68eUHzupCnn2dzG10lH3jJKTWM_hrN1cQ7M,16
29
- python3_commons-0.9.2.dist-info/RECORD,,
24
+ python3_commons-0.9.4.dist-info/licenses/AUTHORS.rst,sha256=3R9JnfjfjH5RoPWOeqKFJgxVShSSfzQPIrEr1nxIo9Q,90
25
+ python3_commons-0.9.4.dist-info/licenses/LICENSE,sha256=xxILuojHm4fKQOrMHPSslbyy6WuKAN2RiG74HbrYfzM,34575
26
+ python3_commons-0.9.4.dist-info/METADATA,sha256=69ltIxCgAOTygVE5iqhGUHvWyOFLUn-Fr4oIAH7Boas,1133
27
+ python3_commons-0.9.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
28
+ python3_commons-0.9.4.dist-info/top_level.txt,sha256=lJI6sCBf68eUHzupCnn2dzG10lH3jJKTWM_hrN1cQ7M,16
29
+ python3_commons-0.9.4.dist-info/RECORD,,