investify-utils 2.0.0a2__tar.gz → 2.0.0a3__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.0a2
3
+ Version: 2.0.0a3
4
4
  Summary: Shared utilities for Investify services
5
5
  Author-Email: Investify <dev@investify.vn>
6
6
  License: MIT
@@ -0,0 +1,25 @@
1
+ """
2
+ PostgreSQL clients for Investify services.
3
+
4
+ Sync client (psycopg3):
5
+ from investify_utils.postgres import PostgresClient
6
+
7
+ Async client (asyncpg):
8
+ from investify_utils.postgres import AsyncPostgresClient
9
+ """
10
+
11
+
12
+ def __getattr__(name: str):
13
+ """Lazy import to avoid loading dependencies for unused clients."""
14
+ if name == "PostgresClient":
15
+ from investify_utils.postgres.sync_client import PostgresClient
16
+
17
+ return PostgresClient
18
+ if name == "AsyncPostgresClient":
19
+ from investify_utils.postgres.async_client import AsyncPostgresClient
20
+
21
+ return AsyncPostgresClient
22
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
23
+
24
+
25
+ __all__ = ["PostgresClient", "AsyncPostgresClient"]
@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
6
6
 
7
7
  [project]
8
8
  name = "investify-utils"
9
- version = "2.0.0a2"
9
+ version = "2.0.0a3"
10
10
  description = "Shared utilities for Investify services"
11
11
  readme = "README.md"
12
12
  requires-python = ">=3.12"
@@ -1,14 +0,0 @@
1
- """
2
- PostgreSQL clients for Investify services.
3
-
4
- Sync client (psycopg3):
5
- from investify_utils.postgres import PostgresClient
6
-
7
- Async client (asyncpg):
8
- from investify_utils.postgres import AsyncPostgresClient
9
- """
10
-
11
- from investify_utils.postgres.sync_client import PostgresClient
12
- from investify_utils.postgres.async_client import AsyncPostgresClient
13
-
14
- __all__ = ["PostgresClient", "AsyncPostgresClient"]