investify-utils 2.0.0a10__tar.gz → 2.0.0a11__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.

Potentially problematic release.


This version of investify-utils might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: investify-utils
3
- Version: 2.0.0a10
3
+ Version: 2.0.0a11
4
4
  Summary: Shared utilities for Investify services
5
5
  Author-Email: Investify <dev@investify.vn>
6
6
  License: MIT
@@ -25,4 +25,4 @@ Usage:
25
25
  from investify_utils.helpers import convert_to_pd_timestamp, create_sql_in_filter
26
26
  """
27
27
 
28
- __version__ = "2.0.0a8"
28
+ __version__ = "2.0.0a11"
@@ -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 typing import Callable
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."""
@@ -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
- "Key": obj["Key"],
108
- "Size": obj["Size"],
109
- "LastModified": obj["LastModified"],
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
-
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "investify-utils"
9
- version = "2.0.0a10"
9
+ version = "2.0.0a11"
10
10
  description = "Shared utilities for Investify services"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.12"