atlan-application-sdk 0.1.1rc54__py3-none-any.whl → 0.1.1rc55__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.
- application_sdk/clients/models.py +5 -1
- application_sdk/clients/sql.py +8 -9
- application_sdk/version.py +1 -1
- {atlan_application_sdk-0.1.1rc54.dist-info → atlan_application_sdk-0.1.1rc55.dist-info}/METADATA +1 -1
- {atlan_application_sdk-0.1.1rc54.dist-info → atlan_application_sdk-0.1.1rc55.dist-info}/RECORD +8 -8
- {atlan_application_sdk-0.1.1rc54.dist-info → atlan_application_sdk-0.1.1rc55.dist-info}/WHEEL +0 -0
- {atlan_application_sdk-0.1.1rc54.dist-info → atlan_application_sdk-0.1.1rc55.dist-info}/licenses/LICENSE +0 -0
- {atlan_application_sdk-0.1.1rc54.dist-info → atlan_application_sdk-0.1.1rc55.dist-info}/licenses/NOTICE +0 -0
|
@@ -31,7 +31,11 @@ class DatabaseConfig(BaseModel):
|
|
|
31
31
|
)
|
|
32
32
|
parameters: Optional[List[str]] = Field(
|
|
33
33
|
default=None,
|
|
34
|
-
description="List of additional connection parameter names that can be dynamically added from credentials",
|
|
34
|
+
description="List of additional connection parameter names that can be dynamically added from credentials to the connection string. ex: ['ssl_mode'] will be added to the connection string as ?ssl_mode=require",
|
|
35
|
+
)
|
|
36
|
+
connect_args: Dict[str, Any] = Field(
|
|
37
|
+
default_factory=dict,
|
|
38
|
+
description="Additional connection arguments to be passed to SQLAlchemy. ex: {'sslmode': 'require'}",
|
|
35
39
|
)
|
|
36
40
|
|
|
37
41
|
class Config:
|
application_sdk/clients/sql.py
CHANGED
|
@@ -37,7 +37,6 @@ class BaseSQLClient(ClientInterface):
|
|
|
37
37
|
Attributes:
|
|
38
38
|
connection: Database connection instance.
|
|
39
39
|
engine: SQLAlchemy engine instance.
|
|
40
|
-
sql_alchemy_connect_args (Dict[str, Any]): Additional connection arguments.
|
|
41
40
|
credentials (Dict[str, Any]): Database credentials.
|
|
42
41
|
resolved_credentials (Dict[str, Any]): Resolved credentials after reading from secret manager.
|
|
43
42
|
use_server_side_cursor (bool): Whether to use server-side cursors.
|
|
@@ -45,7 +44,6 @@ class BaseSQLClient(ClientInterface):
|
|
|
45
44
|
|
|
46
45
|
connection = None
|
|
47
46
|
engine = None
|
|
48
|
-
sql_alchemy_connect_args: Dict[str, Any] = {}
|
|
49
47
|
credentials: Dict[str, Any] = {}
|
|
50
48
|
resolved_credentials: Dict[str, Any] = {}
|
|
51
49
|
use_server_side_cursor: bool = USE_SERVER_SIDE_CURSOR
|
|
@@ -55,7 +53,6 @@ class BaseSQLClient(ClientInterface):
|
|
|
55
53
|
self,
|
|
56
54
|
use_server_side_cursor: bool = USE_SERVER_SIDE_CURSOR,
|
|
57
55
|
credentials: Dict[str, Any] = {},
|
|
58
|
-
sql_alchemy_connect_args: Dict[str, Any] = {},
|
|
59
56
|
):
|
|
60
57
|
"""
|
|
61
58
|
Initialize the SQL client.
|
|
@@ -64,12 +61,9 @@ class BaseSQLClient(ClientInterface):
|
|
|
64
61
|
use_server_side_cursor (bool, optional): Whether to use server-side cursors.
|
|
65
62
|
Defaults to USE_SERVER_SIDE_CURSOR.
|
|
66
63
|
credentials (Dict[str, Any], optional): Database credentials. Defaults to {}.
|
|
67
|
-
sql_alchemy_connect_args (Dict[str, Any], optional): Additional SQLAlchemy
|
|
68
|
-
connection arguments. Defaults to {}.
|
|
69
64
|
"""
|
|
70
65
|
self.use_server_side_cursor = use_server_side_cursor
|
|
71
66
|
self.credentials = credentials
|
|
72
|
-
self.sql_alchemy_connect_args = sql_alchemy_connect_args
|
|
73
67
|
|
|
74
68
|
async def load(self, credentials: Dict[str, Any]) -> None:
|
|
75
69
|
"""Load credentials and prepare engine for lazy connections.
|
|
@@ -83,6 +77,9 @@ class BaseSQLClient(ClientInterface):
|
|
|
83
77
|
Raises:
|
|
84
78
|
ClientError: If credentials are invalid or engine creation fails
|
|
85
79
|
"""
|
|
80
|
+
if not self.DB_CONFIG:
|
|
81
|
+
raise ValueError("DB_CONFIG is not configured for this SQL client.")
|
|
82
|
+
|
|
86
83
|
self.credentials = credentials # Update the instance credentials
|
|
87
84
|
try:
|
|
88
85
|
from sqlalchemy import create_engine
|
|
@@ -90,7 +87,7 @@ class BaseSQLClient(ClientInterface):
|
|
|
90
87
|
# Create engine but no persistent connection
|
|
91
88
|
self.engine = create_engine(
|
|
92
89
|
self.get_sqlalchemy_connection_string(),
|
|
93
|
-
connect_args=self.
|
|
90
|
+
connect_args=self.DB_CONFIG.connect_args,
|
|
94
91
|
pool_pre_ping=True,
|
|
95
92
|
)
|
|
96
93
|
|
|
@@ -397,7 +394,6 @@ class AsyncBaseSQLClient(BaseSQLClient):
|
|
|
397
394
|
Attributes:
|
|
398
395
|
connection (AsyncConnection): Async database connection instance.
|
|
399
396
|
engine (AsyncEngine): Async SQLAlchemy engine instance.
|
|
400
|
-
sql_alchemy_connect_args (Dict[str, Any]): Additional connection arguments.
|
|
401
397
|
credentials (Dict[str, Any]): Database credentials.
|
|
402
398
|
use_server_side_cursor (bool): Whether to use server-side cursors.
|
|
403
399
|
"""
|
|
@@ -419,13 +415,16 @@ class AsyncBaseSQLClient(BaseSQLClient):
|
|
|
419
415
|
ValueError: If credentials are invalid or engine creation fails.
|
|
420
416
|
"""
|
|
421
417
|
self.credentials = credentials
|
|
418
|
+
if not self.DB_CONFIG:
|
|
419
|
+
raise ValueError("DB_CONFIG is not configured for this SQL client.")
|
|
420
|
+
|
|
422
421
|
try:
|
|
423
422
|
from sqlalchemy.ext.asyncio import create_async_engine
|
|
424
423
|
|
|
425
424
|
# Create async engine but no persistent connection
|
|
426
425
|
self.engine = create_async_engine(
|
|
427
426
|
self.get_sqlalchemy_connection_string(),
|
|
428
|
-
connect_args=self.
|
|
427
|
+
connect_args=self.DB_CONFIG.connect_args,
|
|
429
428
|
pool_pre_ping=True,
|
|
430
429
|
)
|
|
431
430
|
if not self.engine:
|
application_sdk/version.py
CHANGED
{atlan_application_sdk-0.1.1rc54.dist-info → atlan_application_sdk-0.1.1rc55.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: atlan-application-sdk
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1rc55
|
|
4
4
|
Summary: Atlan Application SDK is a Python library for developing applications on the Atlan Platform
|
|
5
5
|
Project-URL: Repository, https://github.com/atlanhq/application-sdk
|
|
6
6
|
Project-URL: Documentation, https://github.com/atlanhq/application-sdk/README.md
|
{atlan_application_sdk-0.1.1rc54.dist-info → atlan_application_sdk-0.1.1rc55.dist-info}/RECORD
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
application_sdk/__init__.py,sha256=2e2mvmLJ5dxmJGPELtb33xwP-j6JMdoIuqKycEn7hjg,151
|
|
2
2
|
application_sdk/constants.py,sha256=EDGR-3SuCxNV-3x0D4wA9is9vBbVWa3nHvJ8r2w4lYY,10977
|
|
3
|
-
application_sdk/version.py,sha256=
|
|
3
|
+
application_sdk/version.py,sha256=GSgUx92mCFDwTnAC5gx_IwXSMV4KwnJrIkRB3TCBNxQ,88
|
|
4
4
|
application_sdk/worker.py,sha256=i5f0AeKI39IfsLO05QkwC6uMz0zDPSJqP7B2byri1VI,7489
|
|
5
5
|
application_sdk/activities/__init__.py,sha256=L5WXkTwOwGtjWAlXrUJRCKGwyIyp3z8fBv8BZVCRFQI,11175
|
|
6
6
|
application_sdk/activities/lock_management.py,sha256=oX2qPpfEu_xP0MiaCakVGk9ivZDvG4EddVZag1DuHSE,3976
|
|
@@ -20,9 +20,9 @@ application_sdk/clients/__init__.py,sha256=C9T84J7V6ZumcoWJPAxdd3tqSmbyciaGBJn-C
|
|
|
20
20
|
application_sdk/clients/atlan.py,sha256=l6yV39fr1006SJFwkOTNDQlbSFlHCZQaUPfdUlzdVEg,5053
|
|
21
21
|
application_sdk/clients/atlan_auth.py,sha256=D7FuNqv81ohNXLJtdx1AFw_jU6a3g0Pw6149ia4ucFY,8930
|
|
22
22
|
application_sdk/clients/base.py,sha256=TIn3pG89eXUc1XSYf4jk66m1vajWp0WxcCQOOltdazA,14021
|
|
23
|
-
application_sdk/clients/models.py,sha256=
|
|
23
|
+
application_sdk/clients/models.py,sha256=iZOTyH6LO64kozdiUPCFCN0NgLhd_Gtv0lH7ZIPdo8w,1800
|
|
24
24
|
application_sdk/clients/redis.py,sha256=IfAD32vLp88BCvsDTaQtxFHxzHlEx4V7TK7h1HwDDBg,15917
|
|
25
|
-
application_sdk/clients/sql.py,sha256=
|
|
25
|
+
application_sdk/clients/sql.py,sha256=lXeVu_dute30IaWWK5gHBhjEs2dXp_e0XkOMsbOsq64,19589
|
|
26
26
|
application_sdk/clients/temporal.py,sha256=jC3U8LmW8G6gg-Qmxk0rcAifIGF0KekwP1UkMGXN7RA,18314
|
|
27
27
|
application_sdk/clients/utils.py,sha256=zLFOJbTr_6TOqnjfVFGY85OtIXZ4FQy_rquzjaydkbY,779
|
|
28
28
|
application_sdk/clients/workflow.py,sha256=6bSqmA3sNCk9oY68dOjBUDZ9DhNKQxPD75qqE0cfldc,6104
|
|
@@ -157,8 +157,8 @@ application_sdk/workflows/metadata_extraction/__init__.py,sha256=jHUe_ZBQ66jx8bg
|
|
|
157
157
|
application_sdk/workflows/metadata_extraction/sql.py,sha256=6ZaVt84n-8U2ZvR9GR7uIJKv5v8CuyQjhlnoRJvDszc,12435
|
|
158
158
|
application_sdk/workflows/query_extraction/__init__.py,sha256=n066_CX5RpJz6DIxGMkKS3eGSRg03ilaCtsqfJWQb7Q,117
|
|
159
159
|
application_sdk/workflows/query_extraction/sql.py,sha256=kT_JQkLCRZ44ZpaC4QvPL6DxnRIIVh8gYHLqRbMI-hA,4826
|
|
160
|
-
atlan_application_sdk-0.1.
|
|
161
|
-
atlan_application_sdk-0.1.
|
|
162
|
-
atlan_application_sdk-0.1.
|
|
163
|
-
atlan_application_sdk-0.1.
|
|
164
|
-
atlan_application_sdk-0.1.
|
|
160
|
+
atlan_application_sdk-0.1.1rc55.dist-info/METADATA,sha256=oPFC4krNFgKJYPm5q8u6Cji9hKoZfflnMTTGi8-c7SQ,5634
|
|
161
|
+
atlan_application_sdk-0.1.1rc55.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
162
|
+
atlan_application_sdk-0.1.1rc55.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
163
|
+
atlan_application_sdk-0.1.1rc55.dist-info/licenses/NOTICE,sha256=A-XVVGt3KOYuuMmvSMIFkg534F1vHiCggEBp4Ez3wGk,1041
|
|
164
|
+
atlan_application_sdk-0.1.1rc55.dist-info/RECORD,,
|
{atlan_application_sdk-0.1.1rc54.dist-info → atlan_application_sdk-0.1.1rc55.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|