investify-utils 2.0.0a10__py3-none-any.whl → 2.0.0a11__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.
Potentially problematic release.
This version of investify-utils might be problematic. Click here for more details.
- investify_utils/__init__.py +1 -1
- investify_utils/kafka/__init__.py +8 -0
- investify_utils/kafka/sync_producer.py +1 -1
- investify_utils/postgres/__init__.py +8 -0
- investify_utils/s3/__init__.py +7 -0
- investify_utils/s3/sync_client.py +7 -6
- {investify_utils-2.0.0a10.dist-info → investify_utils-2.0.0a11.dist-info}/METADATA +1 -1
- investify_utils-2.0.0a11.dist-info/RECORD +15 -0
- investify_utils-2.0.0a10.dist-info/RECORD +0 -15
- {investify_utils-2.0.0a10.dist-info → investify_utils-2.0.0a11.dist-info}/WHEEL +0 -0
- {investify_utils-2.0.0a10.dist-info → investify_utils-2.0.0a11.dist-info}/entry_points.txt +0 -0
investify_utils/__init__.py
CHANGED
|
@@ -5,6 +5,14 @@ Usage:
|
|
|
5
5
|
from investify_utils.kafka import AvroProducer, AvroConsumer
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from typing import TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from investify_utils.kafka.sync_consumer import AvroConsumer, OffsetTracker
|
|
14
|
+
from investify_utils.kafka.sync_producer import AvroProducer
|
|
15
|
+
|
|
8
16
|
|
|
9
17
|
def __getattr__(name: str):
|
|
10
18
|
"""Lazy import to avoid loading confluent-kafka if not needed."""
|
|
@@ -23,7 +23,7 @@ Usage:
|
|
|
23
23
|
|
|
24
24
|
import logging
|
|
25
25
|
import threading
|
|
26
|
-
from
|
|
26
|
+
from collections.abc import Callable
|
|
27
27
|
|
|
28
28
|
from confluent_kafka import SerializingProducer
|
|
29
29
|
from confluent_kafka.schema_registry import SchemaRegistryClient, record_subject_name_strategy
|
|
@@ -8,6 +8,14 @@ Async client (asyncpg):
|
|
|
8
8
|
from investify_utils.postgres import AsyncPostgresClient
|
|
9
9
|
"""
|
|
10
10
|
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
from typing import TYPE_CHECKING
|
|
14
|
+
|
|
15
|
+
if TYPE_CHECKING:
|
|
16
|
+
from investify_utils.postgres.async_client import AsyncPostgresClient
|
|
17
|
+
from investify_utils.postgres.sync_client import PostgresClient
|
|
18
|
+
|
|
11
19
|
|
|
12
20
|
def __getattr__(name: str):
|
|
13
21
|
"""Lazy import to avoid loading dependencies for unused clients."""
|
investify_utils/s3/__init__.py
CHANGED
|
@@ -5,6 +5,13 @@ Usage:
|
|
|
5
5
|
from investify_utils.s3 import S3Client
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from typing import TYPE_CHECKING
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from investify_utils.s3.sync_client import S3Client
|
|
14
|
+
|
|
8
15
|
|
|
9
16
|
def __getattr__(name: str):
|
|
10
17
|
"""Lazy import to avoid loading boto3 if not needed."""
|
|
@@ -103,11 +103,13 @@ class S3Client:
|
|
|
103
103
|
|
|
104
104
|
for page in paginator.paginate(Bucket=bucket, Prefix=prefix):
|
|
105
105
|
for obj in page.get("Contents", []):
|
|
106
|
-
objects.append(
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
objects.append(
|
|
107
|
+
{
|
|
108
|
+
"Key": obj["Key"],
|
|
109
|
+
"Size": obj["Size"],
|
|
110
|
+
"LastModified": obj["LastModified"],
|
|
111
|
+
}
|
|
112
|
+
)
|
|
111
113
|
if max_keys and len(objects) >= max_keys:
|
|
112
114
|
return objects
|
|
113
115
|
|
|
@@ -223,4 +225,3 @@ class S3Client:
|
|
|
223
225
|
if e.response["Error"]["Code"] == "404":
|
|
224
226
|
return False
|
|
225
227
|
raise
|
|
226
|
-
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
investify_utils-2.0.0a11.dist-info/METADATA,sha256=cYdtnA6sYYHWQFYqNXySBonnA7429AG0mhBq2CAUQ0I,3676
|
|
2
|
+
investify_utils-2.0.0a11.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
|
|
3
|
+
investify_utils-2.0.0a11.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
+
investify_utils/__init__.py,sha256=yLeCtpNIAuEFohYgTC0JDA2Vs2siB4N5YZ6zRSrzbMU,919
|
|
5
|
+
investify_utils/helpers.py,sha256=1l7nv-P8m-vHQGhjTAJMi-pkvQb8OPzGDIn1KQ499dE,4246
|
|
6
|
+
investify_utils/kafka/__init__.py,sha256=M2XxPW1mA8WDw8NU2ToNrK5cwuk3aa0LfuOQGM2Pf1M,1011
|
|
7
|
+
investify_utils/kafka/sync_consumer.py,sha256=NJu9tQ5MrqL7-0Cvtt9Gmq-Qro_O4VVFP85qIKMf_ZM,6305
|
|
8
|
+
investify_utils/kafka/sync_producer.py,sha256=dhZqF3spxFbLCThUPTTIV0RMXZl4qStR8tCedvew7GQ,4507
|
|
9
|
+
investify_utils/logging.py,sha256=SyqlpyRd0o_FuO29eB7-5-Fo0mfLRVZP_YHjXcQgjiE,2223
|
|
10
|
+
investify_utils/postgres/__init__.py,sha256=RzJDdpEOqBH2s-RNtG3geI4T3RBP6ZogrALfVwr2KqI,968
|
|
11
|
+
investify_utils/postgres/async_client.py,sha256=M3F7-AsBJ43WWhfknnvTK9BeiYAyO0R6n-XY4DOnyFA,3168
|
|
12
|
+
investify_utils/postgres/sync_client.py,sha256=1mozgrNGUUKCR2ETAr9G9dzvW8uG_TmSqcbA63tRpM8,6507
|
|
13
|
+
investify_utils/s3/__init__.py,sha256=YpcMY1DasoeVQmvGQgD8e9jGr6sm5H7emd4rjr5mQhk,544
|
|
14
|
+
investify_utils/s3/sync_client.py,sha256=PRRpyTWNdKah0I2dvHvxclPsuZe4zjS19hkm9OJac7Q,6824
|
|
15
|
+
investify_utils-2.0.0a11.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
investify_utils-2.0.0a10.dist-info/METADATA,sha256=yk0dpTvvrU-C535Jy4yjDXCIpiWZdf94W1jtyw2TRkM,3676
|
|
2
|
-
investify_utils-2.0.0a10.dist-info/WHEEL,sha256=tsUv_t7BDeJeRHaSrczbGeuK-TtDpGsWi_JfpzD255I,90
|
|
3
|
-
investify_utils-2.0.0a10.dist-info/entry_points.txt,sha256=6OYgBcLyFCUgeqLgnvMyOJxPCWzgy7se4rLPKtNonMs,34
|
|
4
|
-
investify_utils/__init__.py,sha256=sES5ddhmaCRi79i6oax6MhB7H5nJg5QjuG6VV1VI2mc,918
|
|
5
|
-
investify_utils/helpers.py,sha256=1l7nv-P8m-vHQGhjTAJMi-pkvQb8OPzGDIn1KQ499dE,4246
|
|
6
|
-
investify_utils/kafka/__init__.py,sha256=QAo0koEnQv939_6yys6z4D1cPlXiAjv-m15d1987Yl0,777
|
|
7
|
-
investify_utils/kafka/sync_consumer.py,sha256=NJu9tQ5MrqL7-0Cvtt9Gmq-Qro_O4VVFP85qIKMf_ZM,6305
|
|
8
|
-
investify_utils/kafka/sync_producer.py,sha256=9EyhKZNCgmBgZw50gwSfSRUTnfPnCq520Mh9MHnGVlI,4498
|
|
9
|
-
investify_utils/logging.py,sha256=SyqlpyRd0o_FuO29eB7-5-Fo0mfLRVZP_YHjXcQgjiE,2223
|
|
10
|
-
investify_utils/postgres/__init__.py,sha256=j4CfUw7U58vWstmxaKQuPkLVbKkOioC4Bc7_knllL_Y,737
|
|
11
|
-
investify_utils/postgres/async_client.py,sha256=M3F7-AsBJ43WWhfknnvTK9BeiYAyO0R6n-XY4DOnyFA,3168
|
|
12
|
-
investify_utils/postgres/sync_client.py,sha256=1mozgrNGUUKCR2ETAr9G9dzvW8uG_TmSqcbA63tRpM8,6507
|
|
13
|
-
investify_utils/s3/__init__.py,sha256=0YX-efJTP38Q5XMCyr7u-fXMjCJXkAR7dG817quTns8,399
|
|
14
|
-
investify_utils/s3/sync_client.py,sha256=fj6ejhAu06BUBRe2pnceKaNGhbPM79Xf47geL0DB-i0,6771
|
|
15
|
-
investify_utils-2.0.0a10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|