dasl-client 1.0.11__py3-none-any.whl → 1.0.12__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.
- dasl_client/client.py +3 -1
- dasl_client/types/content.py +29 -21
- dasl_client/types/rule.py +41 -11
- {dasl_client-1.0.11.dist-info → dasl_client-1.0.12.dist-info}/METADATA +2 -2
- {dasl_client-1.0.11.dist-info → dasl_client-1.0.12.dist-info}/RECORD +8 -8
- {dasl_client-1.0.11.dist-info → dasl_client-1.0.12.dist-info}/LICENSE +0 -0
- {dasl_client-1.0.11.dist-info → dasl_client-1.0.12.dist-info}/WHEEL +0 -0
- {dasl_client-1.0.11.dist-info → dasl_client-1.0.12.dist-info}/top_level.txt +0 -0
dasl_client/client.py
CHANGED
|
@@ -648,5 +648,7 @@ class Client:
|
|
|
648
648
|
"""
|
|
649
649
|
with error_handler():
|
|
650
650
|
return DataSourcePreset.from_api_obj(
|
|
651
|
-
self._content_client().content_v1_get_preset_datasource(
|
|
651
|
+
self._content_client().content_v1_get_preset_datasource(
|
|
652
|
+
self._workspace(), name
|
|
653
|
+
)
|
|
652
654
|
)
|
dasl_client/types/content.py
CHANGED
|
@@ -2,9 +2,14 @@ from typing import Optional, List, Dict
|
|
|
2
2
|
from pydantic import BaseModel
|
|
3
3
|
|
|
4
4
|
from dasl_api import (
|
|
5
|
-
ContentV1PresetDataSourceList,
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
ContentV1PresetDataSourceList,
|
|
6
|
+
ContentV1PresetDataSourceListItemsInner,
|
|
7
|
+
ContentV1DatasourcePresetAutoloader,
|
|
8
|
+
ContentV1DatasourcePresetSilver,
|
|
9
|
+
ContentV1DatasourcePresetSilverPreTransformInner,
|
|
10
|
+
ContentV1DatasourcePresetSilverTransformInner,
|
|
11
|
+
ContentV1DatasourcePresetGoldInner,
|
|
12
|
+
ContentV1DatasourcePreset,
|
|
8
13
|
ContentV1DatasourcePresetAutoloaderCloudFiles,
|
|
9
14
|
)
|
|
10
15
|
|
|
@@ -22,7 +27,7 @@ class SilverPreset(BaseModel):
|
|
|
22
27
|
|
|
23
28
|
@staticmethod
|
|
24
29
|
def from_api_obj(
|
|
25
|
-
|
|
30
|
+
obj: Optional[ContentV1DatasourcePresetSilverPreTransformInner],
|
|
26
31
|
) -> Optional["SilverPreset.PreTransform"]:
|
|
27
32
|
if obj is None:
|
|
28
33
|
return None
|
|
@@ -48,7 +53,7 @@ class SilverPreset(BaseModel):
|
|
|
48
53
|
|
|
49
54
|
@staticmethod
|
|
50
55
|
def from_api_obj(
|
|
51
|
-
|
|
56
|
+
obj: Optional[ContentV1DatasourcePresetSilverTransformInner],
|
|
52
57
|
) -> Optional["SilverPreset.Transform"]:
|
|
53
58
|
if obj is None:
|
|
54
59
|
return None
|
|
@@ -70,22 +75,26 @@ class SilverPreset(BaseModel):
|
|
|
70
75
|
|
|
71
76
|
@staticmethod
|
|
72
77
|
def from_api_obj(
|
|
73
|
-
|
|
78
|
+
obj: Optional[ContentV1DatasourcePresetSilver],
|
|
74
79
|
) -> Optional["SilverPreset"]:
|
|
75
80
|
if obj is None:
|
|
76
81
|
return None
|
|
77
82
|
|
|
78
83
|
if obj.pre_transform is not None:
|
|
79
|
-
pre_transform = [
|
|
84
|
+
pre_transform = [
|
|
85
|
+
SilverPreset.PreTransform.from_api_obj(item)
|
|
86
|
+
for item in obj.pre_transform
|
|
87
|
+
]
|
|
80
88
|
else:
|
|
81
89
|
pre_transform = None
|
|
82
90
|
|
|
83
91
|
if obj.transform is not None:
|
|
84
|
-
transform = [
|
|
92
|
+
transform = [
|
|
93
|
+
SilverPreset.Transform.from_api_obj(item) for item in obj.transform
|
|
94
|
+
]
|
|
85
95
|
else:
|
|
86
96
|
transform = None
|
|
87
97
|
|
|
88
|
-
|
|
89
98
|
return SilverPreset(
|
|
90
99
|
pre_transform=pre_transform,
|
|
91
100
|
transform=transform,
|
|
@@ -102,7 +111,7 @@ class GoldPreset(BaseModel):
|
|
|
102
111
|
|
|
103
112
|
@staticmethod
|
|
104
113
|
def from_api_obj(
|
|
105
|
-
|
|
114
|
+
obj: Optional[ContentV1DatasourcePresetGoldInner],
|
|
106
115
|
) -> Optional["GoldPreset"]:
|
|
107
116
|
if obj is None:
|
|
108
117
|
return None
|
|
@@ -127,7 +136,7 @@ class PresetCloudFiles(BaseModel):
|
|
|
127
136
|
|
|
128
137
|
@staticmethod
|
|
129
138
|
def from_api_obj(
|
|
130
|
-
|
|
139
|
+
obj: Optional[ContentV1DatasourcePresetAutoloaderCloudFiles],
|
|
131
140
|
) -> Optional["PresetCloudFiles"]:
|
|
132
141
|
if obj is None:
|
|
133
142
|
return None
|
|
@@ -146,7 +155,7 @@ class PresetAutoloader(BaseModel):
|
|
|
146
155
|
|
|
147
156
|
@staticmethod
|
|
148
157
|
def from_api_obj(
|
|
149
|
-
|
|
158
|
+
obj: Optional[ContentV1DatasourcePresetAutoloader],
|
|
150
159
|
) -> Optional["PresetAutoloader"]:
|
|
151
160
|
if obj is None:
|
|
152
161
|
return None
|
|
@@ -158,6 +167,7 @@ class PresetAutoloader(BaseModel):
|
|
|
158
167
|
cloud_files=PresetCloudFiles.from_api_obj(obj.cloud_files),
|
|
159
168
|
)
|
|
160
169
|
|
|
170
|
+
|
|
161
171
|
class DataSourcePreset(BaseModel):
|
|
162
172
|
|
|
163
173
|
name: Optional[str] = None
|
|
@@ -169,7 +179,7 @@ class DataSourcePreset(BaseModel):
|
|
|
169
179
|
|
|
170
180
|
@staticmethod
|
|
171
181
|
def from_api_obj(
|
|
172
|
-
|
|
182
|
+
obj: Optional[ContentV1DatasourcePreset],
|
|
173
183
|
) -> Optional["DataSourcePreset"]:
|
|
174
184
|
if obj is None:
|
|
175
185
|
return None
|
|
@@ -182,7 +192,7 @@ class DataSourcePreset(BaseModel):
|
|
|
182
192
|
silver=SilverPreset.from_api_obj(obj.silver),
|
|
183
193
|
gold=[GoldPreset.from_api_obj(item) for item in obj.gold],
|
|
184
194
|
)
|
|
185
|
-
|
|
195
|
+
|
|
186
196
|
|
|
187
197
|
class DataSourcePresetSummary(BaseModel):
|
|
188
198
|
name: Optional[str] = None
|
|
@@ -195,7 +205,7 @@ class DataSourcePresetSummary(BaseModel):
|
|
|
195
205
|
|
|
196
206
|
@staticmethod
|
|
197
207
|
def from_api_obj(
|
|
198
|
-
|
|
208
|
+
obj: Optional[ContentV1PresetDataSourceListItemsInner],
|
|
199
209
|
) -> Optional["DataSourcePresetSummary"]:
|
|
200
210
|
if obj is None:
|
|
201
211
|
return None
|
|
@@ -210,6 +220,7 @@ class DataSourcePresetSummary(BaseModel):
|
|
|
210
220
|
icon_url=obj.icon_url,
|
|
211
221
|
)
|
|
212
222
|
|
|
223
|
+
|
|
213
224
|
class DataSourcePresetsList(BaseModel):
|
|
214
225
|
kind: Optional[str] = None
|
|
215
226
|
cursor: Optional[str] = None
|
|
@@ -217,7 +228,7 @@ class DataSourcePresetsList(BaseModel):
|
|
|
217
228
|
|
|
218
229
|
@staticmethod
|
|
219
230
|
def from_api_obj(
|
|
220
|
-
|
|
231
|
+
obj: Optional[ContentV1PresetDataSourceList],
|
|
221
232
|
) -> Optional["DataSourcePresetsList"]:
|
|
222
233
|
if obj is None:
|
|
223
234
|
return None
|
|
@@ -228,8 +239,5 @@ class DataSourcePresetsList(BaseModel):
|
|
|
228
239
|
return DataSourcePresetsList(
|
|
229
240
|
kind=obj.kind,
|
|
230
241
|
cursor=cursor,
|
|
231
|
-
items=[
|
|
232
|
-
|
|
233
|
-
for item in obj.items
|
|
234
|
-
],
|
|
235
|
-
)
|
|
242
|
+
items=[DataSourcePresetSummary.from_api_obj(item) for item in obj.items],
|
|
243
|
+
)
|
dasl_client/types/rule.py
CHANGED
|
@@ -17,7 +17,7 @@ from dasl_api import (
|
|
|
17
17
|
CoreV1RuleObservable,
|
|
18
18
|
CoreV1RuleObservableRisk,
|
|
19
19
|
CoreV1RuleSpecOutput,
|
|
20
|
-
CoreV1RuleSpecCollate,
|
|
20
|
+
CoreV1RuleSpecCollate, CoreV1RuleSpecInputBatchCustom,
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
from .helpers import Helpers
|
|
@@ -251,9 +251,9 @@ class Rule(BaseModel):
|
|
|
251
251
|
Input if the rule should operate on batched input data.
|
|
252
252
|
"""
|
|
253
253
|
|
|
254
|
-
class
|
|
254
|
+
class CustomStream(BaseModel):
|
|
255
255
|
"""
|
|
256
|
-
Specification of a custom notebook for generating input to
|
|
256
|
+
Specification of a stream custom notebook for generating input to
|
|
257
257
|
the Rule.
|
|
258
258
|
|
|
259
259
|
Attributes:
|
|
@@ -267,10 +267,10 @@ class Rule(BaseModel):
|
|
|
267
267
|
@staticmethod
|
|
268
268
|
def from_api_obj(
|
|
269
269
|
obj: Optional[CoreV1RuleSpecInputStreamCustom],
|
|
270
|
-
) -> "Rule.Input.
|
|
270
|
+
) -> "Rule.Input.CustomStream":
|
|
271
271
|
if obj is None:
|
|
272
272
|
return None
|
|
273
|
-
return Rule.Input.
|
|
273
|
+
return Rule.Input.CustomStream(
|
|
274
274
|
notebook=obj.notebook,
|
|
275
275
|
options=obj.options,
|
|
276
276
|
)
|
|
@@ -281,6 +281,36 @@ class Rule(BaseModel):
|
|
|
281
281
|
options=self.options,
|
|
282
282
|
)
|
|
283
283
|
|
|
284
|
+
class CustomBatch(BaseModel):
|
|
285
|
+
"""
|
|
286
|
+
Specification of a batch custom notebook for generating input to
|
|
287
|
+
the Rule.
|
|
288
|
+
|
|
289
|
+
Attributes:
|
|
290
|
+
notebook (Optional[str]):
|
|
291
|
+
options (Optional[Dict[str, str]]):
|
|
292
|
+
"""
|
|
293
|
+
|
|
294
|
+
notebook: Optional[str] = None
|
|
295
|
+
options: Optional[Dict[str, str]] = None
|
|
296
|
+
|
|
297
|
+
@staticmethod
|
|
298
|
+
def from_api_obj(
|
|
299
|
+
obj: Optional[CoreV1RuleSpecInputBatchCustom],
|
|
300
|
+
) -> "Rule.Input.CustomBatch":
|
|
301
|
+
if obj is None:
|
|
302
|
+
return None
|
|
303
|
+
return Rule.Input.CustomBatch(
|
|
304
|
+
notebook=obj.notebook,
|
|
305
|
+
options=obj.options,
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
def to_api_obj(self) -> CoreV1RuleSpecInputBatchCustom:
|
|
309
|
+
return CoreV1RuleSpecInputBatchCustom(
|
|
310
|
+
notebook=self.notebook,
|
|
311
|
+
options=self.options,
|
|
312
|
+
)
|
|
313
|
+
|
|
284
314
|
class Stream(BaseModel):
|
|
285
315
|
"""
|
|
286
316
|
Specification for streaming input from a table or tables,
|
|
@@ -290,7 +320,7 @@ class Rule(BaseModel):
|
|
|
290
320
|
tables (Optional[List[Rule.Input.Stream.Table]]):
|
|
291
321
|
filter (Optional[str]):
|
|
292
322
|
sql (Optional[str]):
|
|
293
|
-
custom (Optional[Rule.Input.
|
|
323
|
+
custom (Optional[Rule.Input.CustomStream]):
|
|
294
324
|
"""
|
|
295
325
|
|
|
296
326
|
class Table(BaseModel):
|
|
@@ -395,7 +425,7 @@ class Rule(BaseModel):
|
|
|
395
425
|
tables: Optional[List["Rule.Input.Stream.Table"]] = None
|
|
396
426
|
filter: Optional[str] = None
|
|
397
427
|
sql: Optional[str] = None
|
|
398
|
-
custom: Optional["Rule.Input.
|
|
428
|
+
custom: Optional["Rule.Input.CustomStream"] = None
|
|
399
429
|
|
|
400
430
|
@staticmethod
|
|
401
431
|
def from_api_obj(
|
|
@@ -413,7 +443,7 @@ class Rule(BaseModel):
|
|
|
413
443
|
tables=tables,
|
|
414
444
|
filter=obj.filter,
|
|
415
445
|
sql=obj.sql,
|
|
416
|
-
custom=Rule.Input.
|
|
446
|
+
custom=Rule.Input.CustomStream.from_api_obj(obj.custom),
|
|
417
447
|
)
|
|
418
448
|
|
|
419
449
|
def to_api_obj(self) -> CoreV1RuleSpecInputStream:
|
|
@@ -434,11 +464,11 @@ class Rule(BaseModel):
|
|
|
434
464
|
|
|
435
465
|
Attributes:
|
|
436
466
|
sql (Optional[str]):
|
|
437
|
-
custom (Optional[Rule.Input.
|
|
467
|
+
custom (Optional[Rule.Input.CustomBatch]):
|
|
438
468
|
"""
|
|
439
469
|
|
|
440
470
|
sql: Optional[str] = None
|
|
441
|
-
custom: Optional["Rule.Input.
|
|
471
|
+
custom: Optional["Rule.Input.CustomBatch"] = None
|
|
442
472
|
|
|
443
473
|
@staticmethod
|
|
444
474
|
def from_api_obj(
|
|
@@ -448,7 +478,7 @@ class Rule(BaseModel):
|
|
|
448
478
|
return None
|
|
449
479
|
return Rule.Input.Batch(
|
|
450
480
|
sql=obj.sql,
|
|
451
|
-
custom=Rule.Input.
|
|
481
|
+
custom=Rule.Input.CustomBatch.from_api_obj(obj.custom),
|
|
452
482
|
)
|
|
453
483
|
|
|
454
484
|
def to_api_obj(self) -> CoreV1RuleSpecInputBatch:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: dasl_client
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.12
|
|
4
4
|
Summary: The DASL client library used for interacting with the DASL workspace
|
|
5
5
|
Home-page: https://github.com/antimatter/asl
|
|
6
6
|
Author: Antimatter Team
|
|
@@ -8,7 +8,7 @@ Author-email: Antimatter Team <support@antimatter.io>
|
|
|
8
8
|
Requires-Python: >=3.8
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
|
-
Requires-Dist: dasl-api ==0.1.
|
|
11
|
+
Requires-Dist: dasl-api ==0.1.15
|
|
12
12
|
Requires-Dist: databricks-sdk >=0.41.0
|
|
13
13
|
Requires-Dist: pydantic >=2
|
|
14
14
|
Requires-Dist: typing-extensions ==4.10.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
dasl_client/__init__.py,sha256=E6gOgO8qg96Y38JKA-4LyNBvc2ytQPEfhdniYsCWBxA,127
|
|
2
|
-
dasl_client/client.py,sha256=
|
|
2
|
+
dasl_client/client.py,sha256=jiILjQOB4OuXXj7J0ZBYEN-pnHm8VQjj1Jqf54eJvS8,25419
|
|
3
3
|
dasl_client/helpers.py,sha256=hi_SrFhEqBuLWOteuQlv__Atzq2VMCgY7A8xSt3ztuA,1035
|
|
4
4
|
dasl_client/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
dasl_client/auth/auth.py,sha256=yTeijYYpfJVJ_wYyq0U6kAntg4xz5MzIR37_CpVR57k,7277
|
|
@@ -15,15 +15,15 @@ dasl_client/preset_development/preview_parameters.py,sha256=KRk3lTImyvJTeEcepwOS
|
|
|
15
15
|
dasl_client/preset_development/stage.py,sha256=NiDuFiKvoXgqVPPjzB3TZQN1dQeVff6he6oaSVGwkCs,20154
|
|
16
16
|
dasl_client/types/__init__.py,sha256=GsXC3eWuv21VTLPLPH9pzM95JByaKnKrPjJkh2rlZfQ,170
|
|
17
17
|
dasl_client/types/admin_config.py,sha256=Kmx3Kuai9_LWMeO2NpWasRUgLihYSEXGtuYVfG0FkjU,2200
|
|
18
|
-
dasl_client/types/content.py,sha256=
|
|
18
|
+
dasl_client/types/content.py,sha256=b_4-6rcA6uP0aPN-nBd1QonwQ5Bc4lnrHlL6MKYnl8U,7311
|
|
19
19
|
dasl_client/types/datasource.py,sha256=-ABmBh5yZwHeY-PKQMnNCNa9FSzod5n1O817m8ZCL6o,52519
|
|
20
20
|
dasl_client/types/dbui.py,sha256=RZV_YxCc5KIHLcDLO5Gb1t3KnS8JKN4PbhnYGsVJiws,13200
|
|
21
21
|
dasl_client/types/helpers.py,sha256=gLGTvrssAKrdkQT9h80twEosld2egwhvj-zAudxWFPs,109
|
|
22
|
-
dasl_client/types/rule.py,sha256=
|
|
22
|
+
dasl_client/types/rule.py,sha256=AM6N-Zfl0I8tJY9sp4Mlse7Fd7V7WJ_uNrKb4v_hKYM,25777
|
|
23
23
|
dasl_client/types/types.py,sha256=DeUOfdYGOhUGEy7yKOfo0OYTXYRrs57yYgNLUbu7Tlc,8806
|
|
24
24
|
dasl_client/types/workspace_config.py,sha256=73O1qNhp15Q5fjq1WYs9cLDkjvLWbaU-ZxFOoN9krWU,24806
|
|
25
|
-
dasl_client-1.0.
|
|
26
|
-
dasl_client-1.0.
|
|
27
|
-
dasl_client-1.0.
|
|
28
|
-
dasl_client-1.0.
|
|
29
|
-
dasl_client-1.0.
|
|
25
|
+
dasl_client-1.0.12.dist-info/LICENSE,sha256=M35UepUPyKmFkvENlkweeaMElheQqNoM5Emh8ADO-rs,4
|
|
26
|
+
dasl_client-1.0.12.dist-info/METADATA,sha256=iG755uOKeBb57RZBsmT6lxP-MNsuPrzvzFOV4G7Eo1o,741
|
|
27
|
+
dasl_client-1.0.12.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
28
|
+
dasl_client-1.0.12.dist-info/top_level.txt,sha256=kIv8ox_2oJPjGB8_yuey5vvuPCyfY8kywG138f9oSOY,12
|
|
29
|
+
dasl_client-1.0.12.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|