datamasque-python 1.1.2__py3-none-any.whl → 1.1.3__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.
- datamasque/client/__init__.py +2 -0
- datamasque/client/models/connection.py +28 -0
- {datamasque_python-1.1.2.dist-info → datamasque_python-1.1.3.dist-info}/METADATA +1 -1
- {datamasque_python-1.1.2.dist-info → datamasque_python-1.1.3.dist-info}/RECORD +6 -6
- {datamasque_python-1.1.2.dist-info → datamasque_python-1.1.3.dist-info}/WHEEL +0 -0
- {datamasque_python-1.1.2.dist-info → datamasque_python-1.1.3.dist-info}/licenses/LICENSE +0 -0
datamasque/client/__init__.py
CHANGED
|
@@ -33,6 +33,7 @@ from datamasque.client.models.connection import (
|
|
|
33
33
|
DatabaseConnectionConfig,
|
|
34
34
|
DatabaseType,
|
|
35
35
|
DatabricksConnectionConfig,
|
|
36
|
+
DocumentDbConnectionConfig,
|
|
36
37
|
DynamoConnectionConfig,
|
|
37
38
|
FileConnectionConfig,
|
|
38
39
|
MongoConnectionConfig,
|
|
@@ -150,6 +151,7 @@ __all__ = [
|
|
|
150
151
|
"DiscoveryConfigNotFoundError",
|
|
151
152
|
"DiscoveryConfigType",
|
|
152
153
|
"DiscoveryMatch",
|
|
154
|
+
"DocumentDbConnectionConfig",
|
|
153
155
|
"DynamoConnectionConfig",
|
|
154
156
|
"FailedToStartError",
|
|
155
157
|
"FileConnectionConfig",
|
|
@@ -44,6 +44,7 @@ class DatabaseType(Enum):
|
|
|
44
44
|
mssql_linked = "mssql_linked"
|
|
45
45
|
snowflake = "snowflake"
|
|
46
46
|
mongodb = "mongodb"
|
|
47
|
+
documentdb = "documentdb"
|
|
47
48
|
databricks_lakebase = "databricks_lakebase"
|
|
48
49
|
databricks = "databricks"
|
|
49
50
|
informix = "informix"
|
|
@@ -160,6 +161,8 @@ class MongoConnectionConfig(ConnectionConfig):
|
|
|
160
161
|
password: Optional[str] = None
|
|
161
162
|
auth_source: str = "admin"
|
|
162
163
|
tls: bool = False
|
|
164
|
+
tls_ca_file: str = ""
|
|
165
|
+
tls_allow_invalid_certificates: bool = False
|
|
163
166
|
direct_connection: bool = False
|
|
164
167
|
replica_set: str = ""
|
|
165
168
|
is_read_only: bool = False
|
|
@@ -180,6 +183,13 @@ class MongoConnectionConfig(ConnectionConfig):
|
|
|
180
183
|
d["dbpassword"] = password
|
|
181
184
|
if not d.get("tls"):
|
|
182
185
|
d.pop("tls", None)
|
|
186
|
+
d.pop("tls_ca_file", None)
|
|
187
|
+
d.pop("tls_allow_invalid_certificates", None)
|
|
188
|
+
else:
|
|
189
|
+
if not d.get("tls_ca_file"):
|
|
190
|
+
d.pop("tls_ca_file", None)
|
|
191
|
+
if not d.get("tls_allow_invalid_certificates"):
|
|
192
|
+
d.pop("tls_allow_invalid_certificates", None)
|
|
183
193
|
if not d.get("direct_connection"):
|
|
184
194
|
d.pop("direct_connection", None)
|
|
185
195
|
if not d.get("replica_set"):
|
|
@@ -197,6 +207,23 @@ class MongoConnectionConfig(ConnectionConfig):
|
|
|
197
207
|
return data
|
|
198
208
|
|
|
199
209
|
|
|
210
|
+
class DocumentDbConnectionConfig(MongoConnectionConfig):
|
|
211
|
+
"""
|
|
212
|
+
Connection configuration for an AWS DocumentDB cluster.
|
|
213
|
+
|
|
214
|
+
DocumentDB is MongoDB wire-compatible,
|
|
215
|
+
so it reuses `MongoConnectionConfig` (including the TLS handling)
|
|
216
|
+
and only differs by `db_type`/`database_type`.
|
|
217
|
+
"""
|
|
218
|
+
|
|
219
|
+
# Narrowing the inherited Literal is a deliberate Pydantic discriminator override.
|
|
220
|
+
db_type: Literal["documentdb"] = "documentdb" # type: ignore[assignment]
|
|
221
|
+
|
|
222
|
+
@property
|
|
223
|
+
def database_type(self) -> DatabaseType:
|
|
224
|
+
return DatabaseType.documentdb
|
|
225
|
+
|
|
226
|
+
|
|
200
227
|
class SnowflakeConnectionConfig(ConnectionConfig):
|
|
201
228
|
"""
|
|
202
229
|
Connection configuration for a Snowflake database.
|
|
@@ -430,6 +457,7 @@ FILE_TYPE_MAP: dict[str, type[FileConnectionConfig]] = {
|
|
|
430
457
|
DB_TYPE_MAP: dict[str, type[ConnectionConfig]] = {
|
|
431
458
|
DatabaseType.dynamodb.value: DynamoConnectionConfig,
|
|
432
459
|
DatabaseType.mongodb.value: MongoConnectionConfig,
|
|
460
|
+
DatabaseType.documentdb.value: DocumentDbConnectionConfig,
|
|
433
461
|
DatabaseType.snowflake.value: SnowflakeConnectionConfig,
|
|
434
462
|
DatabaseType.mssql_linked.value: MssqlLinkedServerConnectionConfig,
|
|
435
463
|
DatabaseType.databricks.value: DatabricksConnectionConfig,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datamasque-python
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.3
|
|
4
4
|
Summary: Official Python client for the DataMasque data-masking API.
|
|
5
5
|
Project-URL: Homepage, https://datamasque.com/
|
|
6
6
|
Project-URL: Documentation, https://datamasque-python.readthedocs.io/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
datamasque/client/__init__.py,sha256=
|
|
1
|
+
datamasque/client/__init__.py,sha256=bW7Iy-iNxpaYgc_X035KAL-hmOVgr8YcYh5s398zawo,6378
|
|
2
2
|
datamasque/client/base.py,sha256=vP1LuYbqq6U8NAEJWnwNrdt_Fa2wjQTJXHf0gSFO79c,14115
|
|
3
3
|
datamasque/client/connections.py,sha256=EFinx8fJRme0mTxuWY3d29UnmUFbsQhMaUQT0Ma2PK4,2885
|
|
4
4
|
datamasque/client/discovery.py,sha256=MTDiif6YWkv64hHXZ8YJxtRhoeKIvQVfjNYvjCIZCXE,21261
|
|
@@ -15,7 +15,7 @@ datamasque/client/runs.py,sha256=l_JpYgelqsDKW_O6LtsHC60IMXHG9ak_RwVnuvJKE1I,770
|
|
|
15
15
|
datamasque/client/settings.py,sha256=Ui8AyR2XdoW8MZ9FIrGn2jm8DLzUGWIL8i2DOTvu7hc,2898
|
|
16
16
|
datamasque/client/users.py,sha256=VCUo2CJyOw4-aO_3mp_w_0BcSoa6-h1HcReMcAMyumw,3701
|
|
17
17
|
datamasque/client/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
datamasque/client/models/connection.py,sha256=
|
|
18
|
+
datamasque/client/models/connection.py,sha256=Mh7MyTQmF0bllu0rurnFXmbiiq7Htc4bTwK5WQiPXSk,16823
|
|
19
19
|
datamasque/client/models/data_selection.py,sha256=406yyUZ5NmLBSql2lYM1gsTWY5GWmnutmF-DjznAoLc,1904
|
|
20
20
|
datamasque/client/models/discovery.py,sha256=WHSIkFebQ5m47K_BdxY1lvCeeF23q_BbZan7Ryuh5vY,13198
|
|
21
21
|
datamasque/client/models/discovery_config.py,sha256=1CHMgSxMXuarPGfRcz9wX7jeZLn1SDw0UEe-L5naE54,1917
|
|
@@ -30,7 +30,7 @@ datamasque/client/models/ruleset_library.py,sha256=5UbL_M47mgPedo8xt4q5crUh4aeOV
|
|
|
30
30
|
datamasque/client/models/runs.py,sha256=UtPMGCJFLFP1f2nyVGAbl3A5_wAONrRNJ63y43Hbpi0,6213
|
|
31
31
|
datamasque/client/models/status.py,sha256=UUEDHd3CQZA1Mf-1LyhAiE4COuCWvAz5oJx5ECVIwp4,2868
|
|
32
32
|
datamasque/client/models/user.py,sha256=UGAUzgJkf78m24_zFXXoA99zdut48BXkX_ivV8yq1Vc,2043
|
|
33
|
-
datamasque_python-1.1.
|
|
34
|
-
datamasque_python-1.1.
|
|
35
|
-
datamasque_python-1.1.
|
|
36
|
-
datamasque_python-1.1.
|
|
33
|
+
datamasque_python-1.1.3.dist-info/METADATA,sha256=1OFcE21laJ8mFsaUCuJaGFssUJFsZzsDen7tpW59gUA,4187
|
|
34
|
+
datamasque_python-1.1.3.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
|
|
35
|
+
datamasque_python-1.1.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
36
|
+
datamasque_python-1.1.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|