datamasque-python 1.0.1__py3-none-any.whl → 1.0.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 +30 -0
- {datamasque_python-1.0.1.dist-info → datamasque_python-1.0.3.dist-info}/METADATA +1 -1
- {datamasque_python-1.0.1.dist-info → datamasque_python-1.0.3.dist-info}/RECORD +6 -6
- {datamasque_python-1.0.1.dist-info → datamasque_python-1.0.3.dist-info}/WHEEL +0 -0
- {datamasque_python-1.0.1.dist-info → datamasque_python-1.0.3.dist-info}/licenses/LICENSE +0 -0
datamasque/client/__init__.py
CHANGED
|
@@ -30,6 +30,7 @@ from datamasque.client.models.connection import (
|
|
|
30
30
|
ConnectionId,
|
|
31
31
|
DatabaseConnectionConfig,
|
|
32
32
|
DatabaseType,
|
|
33
|
+
DatabricksConnectionConfig,
|
|
33
34
|
DynamoConnectionConfig,
|
|
34
35
|
FileConnectionConfig,
|
|
35
36
|
MongoConnectionConfig,
|
|
@@ -128,6 +129,7 @@ __all__ = [
|
|
|
128
129
|
"DataMasqueUserError",
|
|
129
130
|
"DatabaseConnectionConfig",
|
|
130
131
|
"DatabaseType",
|
|
132
|
+
"DatabricksConnectionConfig",
|
|
131
133
|
"DiscoveryMatch",
|
|
132
134
|
"DynamoConnectionConfig",
|
|
133
135
|
"FailedToStartError",
|
|
@@ -45,6 +45,7 @@ class DatabaseType(Enum):
|
|
|
45
45
|
snowflake = "snowflake"
|
|
46
46
|
mongodb = "mongodb"
|
|
47
47
|
databricks_lakebase = "databricks_lakebase"
|
|
48
|
+
databricks = "databricks"
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
class SnowflakeStageLocation(str, Enum):
|
|
@@ -280,6 +281,8 @@ class DatabaseConnectionConfig(ConnectionConfig):
|
|
|
280
281
|
raise ValueError("For Snowflake, use the SnowflakeConnectionConfig class instead")
|
|
281
282
|
if self.database_type is DatabaseType.mongodb:
|
|
282
283
|
raise ValueError("For MongoDB, use the MongoConnectionConfig class instead")
|
|
284
|
+
if self.database_type is DatabaseType.databricks:
|
|
285
|
+
raise ValueError("For Databricks SQL Warehouse, use the DatabricksConnectionConfig class instead")
|
|
283
286
|
return self
|
|
284
287
|
|
|
285
288
|
mask_type: Literal["database"] = "database"
|
|
@@ -391,6 +394,32 @@ class MountedShareConnectionConfig(FileConnectionConfig):
|
|
|
391
394
|
type: Literal["mounted_share_connection"] = "mounted_share_connection"
|
|
392
395
|
|
|
393
396
|
|
|
397
|
+
class DatabricksConnectionConfig(ConnectionConfig):
|
|
398
|
+
"""Connection configuration for a Databricks SQL Warehouse."""
|
|
399
|
+
|
|
400
|
+
server_hostname: str
|
|
401
|
+
http_path: str
|
|
402
|
+
access_token: Optional[str] = None
|
|
403
|
+
catalog: str
|
|
404
|
+
db_schema: Optional[str] = Field(default=None, alias="schema")
|
|
405
|
+
is_read_only: bool = False
|
|
406
|
+
version: str = "1.0"
|
|
407
|
+
|
|
408
|
+
mask_type: Literal["database"] = "database"
|
|
409
|
+
db_type: Literal["databricks"] = "databricks"
|
|
410
|
+
|
|
411
|
+
@property
|
|
412
|
+
def database_type(self) -> DatabaseType:
|
|
413
|
+
return DatabaseType.databricks
|
|
414
|
+
|
|
415
|
+
@model_validator(mode="before")
|
|
416
|
+
@classmethod
|
|
417
|
+
def _strip_encrypted_token(cls, data: dict) -> dict:
|
|
418
|
+
if isinstance(data, dict):
|
|
419
|
+
data.pop("access_token_encrypted", None)
|
|
420
|
+
return data
|
|
421
|
+
|
|
422
|
+
|
|
394
423
|
FILE_TYPE_MAP: dict[str, type[FileConnectionConfig]] = {
|
|
395
424
|
"s3_connection": S3ConnectionConfig,
|
|
396
425
|
"azure_blob_connection": AzureConnectionConfig,
|
|
@@ -402,6 +431,7 @@ DB_TYPE_MAP: dict[str, type[ConnectionConfig]] = {
|
|
|
402
431
|
DatabaseType.mongodb.value: MongoConnectionConfig,
|
|
403
432
|
DatabaseType.snowflake.value: SnowflakeConnectionConfig,
|
|
404
433
|
DatabaseType.mssql_linked.value: MssqlLinkedServerConnectionConfig,
|
|
434
|
+
DatabaseType.databricks.value: DatabricksConnectionConfig,
|
|
405
435
|
# others use the default `DatabaseConnectionConfig`
|
|
406
436
|
}
|
|
407
437
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datamasque-python
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.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=rH7hQyA_nFVkv8eV_C1Ds_40v9xzCK__uXIJtWMLfuQ,5472
|
|
2
2
|
datamasque/client/base.py,sha256=he-ObABs_rpXV_KSMmrtJ73D-9lb0giAK029lN5qB3Y,11817
|
|
3
3
|
datamasque/client/connections.py,sha256=EFinx8fJRme0mTxuWY3d29UnmUFbsQhMaUQT0Ma2PK4,2885
|
|
4
4
|
datamasque/client/discovery.py,sha256=uA8h6vRqsxSAzSAV9bebJwU47XINlaVy7V1nTYDiaCM,12634
|
|
@@ -14,7 +14,7 @@ datamasque/client/runs.py,sha256=ZPSkkuyqMiwy7dLbWZ1PAEKaesKLeNRX7xEJGfzieVg,742
|
|
|
14
14
|
datamasque/client/settings.py,sha256=Ui8AyR2XdoW8MZ9FIrGn2jm8DLzUGWIL8i2DOTvu7hc,2898
|
|
15
15
|
datamasque/client/users.py,sha256=VCUo2CJyOw4-aO_3mp_w_0BcSoa6-h1HcReMcAMyumw,3701
|
|
16
16
|
datamasque/client/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
datamasque/client/models/connection.py,sha256=
|
|
17
|
+
datamasque/client/models/connection.py,sha256=NCKlA6w_Lu-G-v3C5dUC8GsOxIck4waW0PtXGoz4FZQ,15752
|
|
18
18
|
datamasque/client/models/data_selection.py,sha256=406yyUZ5NmLBSql2lYM1gsTWY5GWmnutmF-DjznAoLc,1904
|
|
19
19
|
datamasque/client/models/discovery.py,sha256=BawKusPuhyt0gRRnWKYf-ZKF7V54GxkhgYIrEQ6XkOs,7283
|
|
20
20
|
datamasque/client/models/dm_instance.py,sha256=yjjpHZJTFhJp3lAinTEffgKrxnadrJys1EuhO77wQcA,1561
|
|
@@ -27,7 +27,7 @@ datamasque/client/models/ruleset_library.py,sha256=gIqb6yn4-f9i2OydOLk1cd0zId9nG
|
|
|
27
27
|
datamasque/client/models/runs.py,sha256=oVYo9jp9s5LjWts0LKsYpX3HUBmrVwuuzDqFtQmTjvo,5673
|
|
28
28
|
datamasque/client/models/status.py,sha256=rjH6YSwAHoOUaUCADwvMhuKd0ygT0c2w2Ek5SV8PWD8,1984
|
|
29
29
|
datamasque/client/models/user.py,sha256=UGAUzgJkf78m24_zFXXoA99zdut48BXkX_ivV8yq1Vc,2043
|
|
30
|
-
datamasque_python-1.0.
|
|
31
|
-
datamasque_python-1.0.
|
|
32
|
-
datamasque_python-1.0.
|
|
33
|
-
datamasque_python-1.0.
|
|
30
|
+
datamasque_python-1.0.3.dist-info/METADATA,sha256=BLZ0xOeNh8fHFQqIu0CGJi0iFzWgVwq9hVHHMlH8A14,4187
|
|
31
|
+
datamasque_python-1.0.3.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
32
|
+
datamasque_python-1.0.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
33
|
+
datamasque_python-1.0.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|