datamasque-python 1.3.1__py3-none-any.whl → 1.4.0__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.
@@ -38,6 +38,7 @@ from datamasque.client.models.connection import (
38
38
  DocumentDbConnectionConfig,
39
39
  DynamoConnectionConfig,
40
40
  FileConnectionConfig,
41
+ LicenseLock,
41
42
  MongoConnectionConfig,
42
43
  MountedShareConnectionConfig,
43
44
  MssqlLinkedServerConnectionConfig,
@@ -243,6 +244,7 @@ __all__ = [
243
244
  "LengthUnit",
244
245
  "LengthsStatistics",
245
246
  "LicenseInfo",
247
+ "LicenseLock",
246
248
  "Locator",
247
249
  "MaskType",
248
250
  "MaskedFormEntry",
@@ -1,5 +1,6 @@
1
1
  """Connection configuration models for the DataMasque API."""
2
2
 
3
+ from datetime import datetime
3
4
  from enum import Enum
4
5
  from typing import Any, Callable, Literal, NewType, Optional
5
6
 
@@ -99,6 +100,22 @@ class SseConfig(BaseModel):
99
100
  return self
100
101
 
101
102
 
103
+ class LicenseLock(BaseModel):
104
+ """
105
+ Read-only license-lock metadata for a connection.
106
+
107
+ The server reports this only on instances whose license has a finite connection cap
108
+ and counts this connection's type against that cap,
109
+ once the connection's first run has finished successfully;
110
+ otherwise it is `null`.
111
+ """
112
+
113
+ model_config = ConfigDict(extra="allow")
114
+
115
+ locked_at: datetime
116
+ editable_from: datetime
117
+
118
+
102
119
  class ConnectionConfig(BaseModel):
103
120
  """
104
121
  Base class for all connection configurations.
@@ -111,6 +128,16 @@ class ConnectionConfig(BaseModel):
111
128
 
112
129
  name: str
113
130
  id: Optional[ConnectionId] = None
131
+ # Server-populated and read-only, so it is excluded when serializing a config back to the API.
132
+ license_lock: Optional[LicenseLock] = Field(default=None, exclude=True)
133
+ # Whether the connection's protected fields are currently locked under the license edit lock.
134
+ target_frozen: bool = Field(default=False, exclude=True)
135
+ # The protected fields currently locked, as server config keys (e.g. `schema`, not `db_schema`);
136
+ # empty when `target_frozen` is False.
137
+ frozen_target_fields: list[str] = Field(default_factory=list, exclude=True)
138
+ # Whether deleting the connection is currently blocked. Not always equal to `target_frozen`:
139
+ # deletion stays allowed while over the connection cap, so a downgrade can be recovered from.
140
+ deletion_frozen: bool = Field(default=False, exclude=True)
114
141
 
115
142
 
116
143
  class DynamoConnectionConfig(ConnectionConfig):
@@ -46,3 +46,10 @@ class Ruleset(GitTrackedEntity):
46
46
  is_valid: Optional[ValidationStatus] = Field(default=None, exclude=True)
47
47
  validation_errors: list[ValidationErrorDetails] = Field(default_factory=list, exclude=True)
48
48
  """Validation errors surfaced by the server; empty when valid."""
49
+ unlicensed_feature_warnings: Optional[list[str]] = Field(default=None, exclude=True)
50
+ """
51
+ At most one sentence, naming every feature the ruleset uses that the server's license does not allow.
52
+ Empty when the ruleset needs nothing its license withholds,
53
+ and `None` when the server does not know which features the ruleset uses, for example before it has passed
54
+ validation. `None` is not the same as having no warnings.
55
+ """
@@ -21,5 +21,12 @@ class RulesetLibrary(GitTrackedEntity):
21
21
  is_valid: Optional[ValidationStatus] = Field(default=None, exclude=True)
22
22
  validation_errors: list[ValidationErrorDetails] = Field(default_factory=list, exclude=True)
23
23
  """Validation errors surfaced by the server; empty when valid."""
24
+ unlicensed_feature_warnings: Optional[list[str]] = Field(default=None, exclude=True)
25
+ """
26
+ At most one sentence, naming every feature the library uses that the server's license does not allow.
27
+ Empty when the license allows every feature,
28
+ and `None` when the server does not know which features the library uses, for example before it has passed
29
+ validation.
30
+ """
24
31
  created: Optional[datetime] = Field(default=None, exclude=True)
25
32
  modified: Optional[datetime] = Field(default=None, exclude=True)
@@ -64,7 +64,8 @@ class RulesetLibraryClient(BaseClient):
64
64
  Creates a new ruleset library on the server.
65
65
 
66
66
  Sets the library's server-assigned fields
67
- (`id`, `is_valid`, `validation_errors`, `git`, `created`, `modified`) and returns the library.
67
+ (`id`, `is_valid`, `validation_errors`, `unlicensed_feature_warnings`, `git`, `created`, `modified`)
68
+ and returns the library.
68
69
  """
69
70
 
70
71
  data = library.model_dump(exclude_none=True, by_alias=True, mode="json")
@@ -73,6 +74,7 @@ class RulesetLibraryClient(BaseClient):
73
74
  library.id = created_library.id
74
75
  library.is_valid = created_library.is_valid
75
76
  library.validation_errors = created_library.validation_errors
77
+ library.unlicensed_feature_warnings = created_library.unlicensed_feature_warnings
76
78
  library.git = created_library.git
77
79
  library.created = created_library.created
78
80
  library.modified = created_library.modified
@@ -94,6 +96,7 @@ class RulesetLibraryClient(BaseClient):
94
96
  updated_library = RulesetLibrary.model_validate(response.json())
95
97
  library.is_valid = updated_library.is_valid
96
98
  library.validation_errors = updated_library.validation_errors
99
+ library.unlicensed_feature_warnings = updated_library.unlicensed_feature_warnings
97
100
  library.git = updated_library.git
98
101
  library.modified = updated_library.modified
99
102
  logger.debug('Update of ruleset library "%s" successful', library.name)
@@ -20,7 +20,7 @@ class RulesetClient(BaseClient):
20
20
  """
21
21
  Creates or updates a ruleset.
22
22
 
23
- Populates the given ruleset's `id`, `is_valid`, `validation_errors`,
23
+ Populates the given ruleset's `id`, `is_valid`, `validation_errors`, `unlicensed_feature_warnings`,
24
24
  and `git` fields from the server response, and returns the same ruleset instance for convenience.
25
25
  """
26
26
 
@@ -30,6 +30,7 @@ class RulesetClient(BaseClient):
30
30
  ruleset.id = created.id
31
31
  ruleset.is_valid = created.is_valid
32
32
  ruleset.validation_errors = created.validation_errors
33
+ ruleset.unlicensed_feature_warnings = created.unlicensed_feature_warnings
33
34
  ruleset.git = created.git
34
35
 
35
36
  if response.status_code == 201:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: datamasque-python
3
- Version: 1.3.1
3
+ Version: 1.4.0
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=as2_y3uIF2JR8Dsv3stXyuTKt0e5SGZbyVdLibdlpn4,8803
1
+ datamasque/client/__init__.py,sha256=_EhdbVF4G73PAHiNw6TzyphmctQxJIj8N9sNbwyJfjY,8839
2
2
  datamasque/client/base.py,sha256=cXU4dluL9e1N1F2pV48iIvebv6OHt7Kh4Ka2y9vkOPo,14296
3
3
  datamasque/client/connections.py,sha256=EFinx8fJRme0mTxuWY3d29UnmUFbsQhMaUQT0Ma2PK4,2885
4
4
  datamasque/client/discovery.py,sha256=xidiAj5LdVSGQy6pjta_2Z_aJmuPPohblyNDfua_Mxk,28859
@@ -11,15 +11,15 @@ datamasque/client/ifm.py,sha256=uIMxpLIPvDiDO1m4bxezixNIUFIFY0MXWRMQNvTbpTA,1185
11
11
  datamasque/client/license.py,sha256=pluYaSU168OC6_laB9bM9H3Vuuxs8wa9gujCJvtoJCk,1392
12
12
  datamasque/client/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  datamasque/client/rg_configs.py,sha256=jcrbw-oMhj6o3Wsf8xy3peVo7DzeQ8EhhAsfcEwC3lc,5816
14
- datamasque/client/ruleset_libraries.py,sha256=dQthTFS5N9vFYN_qK1ZSnHnJGLmhwzKNQrKonItK85w,7275
15
- datamasque/client/rulesets.py,sha256=gzxn9mR7PhCySRUUB1cyl4aLmEfuDKj8BvQUq8OgLH8,2563
14
+ datamasque/client/ruleset_libraries.py,sha256=1eVLFn1uQruhP81X2m7kKxtmcA-HG4lNMLr8jSuX0DU,7494
15
+ datamasque/client/rulesets.py,sha256=G8oFz-Y7b6mGjWQYANzihXxqlCMWRXu38tNlerXhIE8,2676
16
16
  datamasque/client/runs.py,sha256=l_JpYgelqsDKW_O6LtsHC60IMXHG9ak_RwVnuvJKE1I,7703
17
17
  datamasque/client/settings.py,sha256=Ui8AyR2XdoW8MZ9FIrGn2jm8DLzUGWIL8i2DOTvu7hc,2898
18
18
  datamasque/client/spcs.py,sha256=geHrBQ6WLWsMGpSMV8hmK5SFAwftrOU0DXkrR2orOmo,7532
19
19
  datamasque/client/table_references.py,sha256=dPyB59Sz4iLuF1lc7xffgf9qeNTFA5srT55E8TnFLvk,6092
20
20
  datamasque/client/users.py,sha256=VCUo2CJyOw4-aO_3mp_w_0BcSoa6-h1HcReMcAMyumw,3701
21
21
  datamasque/client/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- datamasque/client/models/connection.py,sha256=W5WtzrrEfrZi7rUBMGcIZ7P6HRQ8PAC3btlD-07n4cY,20201
22
+ datamasque/client/models/connection.py,sha256=6ip7VbFZfDkg08oTz3ZTw8E8PRMiJprluQihFR23bFA,21484
23
23
  datamasque/client/models/data_selection.py,sha256=9hRpkQQIQlKGFYDYQCrreggsv96dh6DelppCpCE4S2U,2725
24
24
  datamasque/client/models/discovery.py,sha256=BvAK9zj0jwUc1O4DSluMcjeoYhF4HKOkJmO4uAhzet4,18222
25
25
  datamasque/client/models/discovery_config.py,sha256=8sqs9x_X0H_hR1fJDEFmOdJyGRDwgbdb3eddEAe98WE,2420
@@ -31,14 +31,14 @@ datamasque/client/models/ifm.py,sha256=j0Ef2BZYTk6MNZO6HS6mW0qWs1_wWD9PlUP_Y6WyB
31
31
  datamasque/client/models/license.py,sha256=OqIn4Sx3ATBStgt5KNiCOBChTTFYLBsyGj7inAl8oB4,2113
32
32
  datamasque/client/models/pagination.py,sha256=egg9aO2cf6KUDwDANPu5RxpJbdRKdwUdCQAtusnuf1c,651
33
33
  datamasque/client/models/rg_config.py,sha256=g6g0qMTeR6OcM4Ji8fHrDOnOM5fsz1UYxntn_mv_k88,1792
34
- datamasque/client/models/ruleset.py,sha256=FDnvewJQvbeH73LpZiwYg3BG9Ya4yhmKKGmO1BKZQPk,1549
35
- datamasque/client/models/ruleset_library.py,sha256=Pw6Udr7pMgPt1AcG2ZhUXOPBS7tTvpw13UZNLILhZbQ,1003
34
+ datamasque/client/models/ruleset.py,sha256=q8p24uVZQtlSOdmyyF1g_xU4zp7JYhfGOExs13TzkKg,1997
35
+ datamasque/client/models/ruleset_library.py,sha256=VzJDCH-TGTLs1CcQ6Jv4fNW01nksBDQLHuLy-b3hOA0,1390
36
36
  datamasque/client/models/runs.py,sha256=UtPMGCJFLFP1f2nyVGAbl3A5_wAONrRNJ63y43Hbpi0,6213
37
37
  datamasque/client/models/safe_data_preview.py,sha256=BiI9d13KdQrTin2JfbjiRiODjns_FipWmfcEyfQzN1E,6778
38
38
  datamasque/client/models/status.py,sha256=DXcucL_jRsOQ0vaV0t8CJt6crvCIOLBn07KuwpwW-4A,3247
39
39
  datamasque/client/models/table_reference.py,sha256=55fKdHjC2TQnUmbp0XiWqfeFGXqcq4wXjbWgMaN3p3c,3835
40
40
  datamasque/client/models/user.py,sha256=UGAUzgJkf78m24_zFXXoA99zdut48BXkX_ivV8yq1Vc,2043
41
- datamasque_python-1.3.1.dist-info/METADATA,sha256=jL9nWa444wMp81T95Dh97R1qegGQy-XmnPkRJpWN930,4497
42
- datamasque_python-1.3.1.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
43
- datamasque_python-1.3.1.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
- datamasque_python-1.3.1.dist-info/RECORD,,
41
+ datamasque_python-1.4.0.dist-info/METADATA,sha256=CGqc4Lo0cmd33pQsRzB07rzJjtnHEXklQeAxJ951xJE,4497
42
+ datamasque_python-1.4.0.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
43
+ datamasque_python-1.4.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
44
+ datamasque_python-1.4.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.32.0
2
+ Generator: hatchling 1.32.4
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any