dasl-client 1.0.6__py3-none-any.whl → 1.0.9__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.

Potentially problematic release.


This version of dasl-client might be problematic. Click here for more details.

@@ -8,7 +8,6 @@ from dasl_api import (
8
8
  WorkspaceV1ExportConfigWebhookConfigDestination,
9
9
  WorkspaceV1WorkspaceConfig,
10
10
  WorkspaceV1WorkspaceConfigSpec,
11
- WorkspaceV1WorkspaceConfigSpecComputeGroupLimitsInner,
12
11
  WorkspaceV1WorkspaceConfigSpecDefaultConfig,
13
12
  WorkspaceV1WorkspaceConfigSpecDetectionRuleMetadata,
14
13
  WorkspaceV1WorkspaceConfigSpecManagedRetentionInner,
@@ -31,13 +30,14 @@ class ExportConfig(BaseModel):
31
30
 
32
31
  Attributes:
33
32
  destination (Optional[str]):
34
- export_open_only (Optional[bool]): If true, only open events are
35
- exported. If false, any event not in state . ClosedAsExported
36
- will be exported.
37
- webhook_config (Optional[ExportConfig.WebhookConfig]): Set when
38
- exporting to a webhook.
39
- slack_config (Optional[ExportConfig.SlackConfig]): Set when exporting
40
- to slack.
33
+ Name of the destination. 'webhook' or 'slack'.
34
+ export_open_only (Optional[bool]):
35
+ If true, only open events are exported. If false, any event not
36
+ in state ClosedAsExported will be exported.
37
+ webhook_config (Optional[ExportConfig.WebhookConfig]):
38
+ Set when exporting to a webhook.
39
+ slack_config (Optional[ExportConfig.SlackConfig]):
40
+ Set when exporting to slack.
41
41
  """
42
42
 
43
43
  class WebhookDestination(BaseModel):
@@ -238,35 +238,6 @@ class WorkspaceConfigObservables(BaseModel):
238
238
  )
239
239
 
240
240
 
241
- class ComputeGroupLimits(BaseModel):
242
- """
243
- Configuration of limits for the number of resources that can be placed
244
- in a user-defined compute group.
245
-
246
- Attributes:
247
- group_name (Optional[str]): Name of the compute group for this limit.
248
- limit (Optional[int]): Limit of maximum number of resources in the group.
249
- """
250
-
251
- group_name: Optional[str] = None
252
- limit: Optional[int] = None
253
-
254
- @staticmethod
255
- def from_api_obj(
256
- obj: WorkspaceV1WorkspaceConfigSpecComputeGroupLimitsInner,
257
- ) -> "ComputeGroupLimits":
258
- return ComputeGroupLimits(
259
- group_name=obj.group_name,
260
- limit=obj.limit,
261
- )
262
-
263
- def to_api_obj(self) -> WorkspaceV1WorkspaceConfigSpecComputeGroupLimitsInner:
264
- return WorkspaceV1WorkspaceConfigSpecComputeGroupLimitsInner(
265
- group_name=self.group_name,
266
- limit=self.limit,
267
- )
268
-
269
-
270
241
  class DefaultConfig(BaseModel):
271
242
  """
272
243
  Configuration of the schemas, notebook storage locations, checkpoint
@@ -275,15 +246,15 @@ class DefaultConfig(BaseModel):
275
246
  specified DefaultConfig.
276
247
 
277
248
  Attributes:
278
- datasources (Optional[DefaultConfig.Config]): Configuration that
279
- applies to DataSources. May be omitted.
280
- transforms (Optional[DefaultConfig.Config]): Configuration that
281
- applies to Transforms. May be omitted.
282
- rules (Optional[DefaultConfig.Config]): Configuration that applies
283
- to Rules. May be omitted.
284
- var_global (Optional[DefaultConfig.Config]): Configuration that
285
- applies globally to resources without a resource-specific
286
- configuration specified. Must be specified.
249
+ datasources (Optional[DefaultConfig.Config]):
250
+ Configuration that applies to DataSources. May be omitted.
251
+ transforms (Optional[DefaultConfig.Config]):
252
+ Configuration that applies to Transforms. May be omitted.
253
+ rules (Optional[DefaultConfig.Config]):
254
+ Configuration that applies to Rules. May be omitted.
255
+ var_global (Optional[DefaultConfig.Config]):
256
+ Configuration that applies globally to resources without a
257
+ resource-specific configuration specified. Must be specified.
287
258
  """
288
259
 
289
260
  class Config(BaseModel):
@@ -291,26 +262,25 @@ class DefaultConfig(BaseModel):
291
262
  Default configuration for a specific resource type.
292
263
 
293
264
  Attributes:
294
- notebook_location (Optional[str]): A location for user created/
295
- edited/provided notebook.
296
- bronze_schema (Optional[str]): Name of the bronze schema in
297
- the catalog.
298
- silver_schema (Optional[str]): Name of the silver schema in
299
- the catalog.
300
- gold_schema (Optional[str]): Name of the gold schema in
301
- the catalog.
302
- catalog_name (Optional[str]): The catalog name to use as the
303
- resource's default.
304
- default_max_resources_per_job (Optional[int]): Default maximum
305
- number of resources that can be placed into a single job,
306
- subject to compute_group_overrides.
307
- checkpoint_location (Optional[str]): The location to store
308
- checkpoints for streaming writes. If not provided, the
309
- daslStoragePath will be used.
310
- compute_group_overrides (Optional[Dict[str, DefaultConfig.
311
- Config.ComputeGroupOverrides]]): Overrides for the maximum
312
- number of resources that can be placed into a single job,
313
- keyed by the compute group name.
265
+ notebook_location (Optional[str]):
266
+ A location for user created/edited/provided notebook.
267
+ bronze_schema (Optional[str]):
268
+ Name of the bronze schema in the catalog.
269
+ silver_schema (Optional[str]):
270
+ Name of the silver schema in the catalog.
271
+ gold_schema (Optional[str]):
272
+ Name of the gold schema in the catalog.
273
+ catalog_name (Optional[str]):
274
+ The catalog name to use as the resource's default.
275
+ default_max_resources_per_job (Optional[int]):
276
+ Default maximum number of resources that can be placed into
277
+ a single job, subject to compute_group_overrides.
278
+ checkpoint_location (Optional[str]):
279
+ The location to store checkpoints for streaming writes. If
280
+ not provided, the daslStoragePath will be used.
281
+ compute_group_overrides (Optional[Dict[str, DefaultConfig.Config.ComputeGroupOverrides]]):
282
+ Overrides for the maximum number of resources that can be
283
+ placed into a single job, keyed by the compute group name.
314
284
  """
315
285
 
316
286
  class ComputeGroupOverrides(BaseModel):
@@ -319,9 +289,9 @@ class DefaultConfig(BaseModel):
319
289
  into a single job.
320
290
 
321
291
  Attributes:
322
- max_resources_per_job (Optional[int]): The maximum number
323
- of resources that can be placed into a job before a
324
- new job will be created.
292
+ max_resources_per_job (Optional[int]):
293
+ The maximum number of resources that can be placed into a
294
+ job before a new job will be created.
325
295
  """
326
296
 
327
297
  max_resources_per_job: Optional[int] = None
@@ -438,14 +408,18 @@ class ManagedRetention(BaseModel):
438
408
  Configuration of cleanup jobs for old data stored by DASL.
439
409
 
440
410
  Attributes:
441
- catalog (str): The name of the catalog.
442
- var_schema (str): The name of the schema.
411
+ catalog (str):
412
+ The name of the catalog.
413
+ var_schema (str):
414
+ The name of the schema.
443
415
  column (Optional[str]):
444
- duration (Optional[str]): The duration for which to retain data in
445
- the schema. It may also be "forever" to indicate data should not
446
- be deleted.
447
- overrides (Optional[List[ManagedRetention.Overrides]]): Overrides for
448
- per-table retention rules within the specified catalog and schema.
416
+ The name of the column.
417
+ duration (Optional[str]):
418
+ The duration for which to retain data in the schema. It may also
419
+ be "forever" to indicate data should not be deleted.
420
+ overrides (Optional[List[ManagedRetention.Overrides]]):
421
+ Overrides for per-table retention rules within the specified
422
+ catalog and schema.
449
423
  """
450
424
 
451
425
  class Overrides(BaseModel):
@@ -453,11 +427,13 @@ class ManagedRetention(BaseModel):
453
427
  Per-table retention override settings.
454
428
 
455
429
  Attributes:
456
- table (str): The name of the table in the catalog and schema.
430
+ table (str):
431
+ The name of the table in the catalog and schema.
457
432
  column (Optional[str]):
458
- duration (Optional[str]): The duration for which to retain data
459
- in the table. It may also be "forever" to indicate data
460
- should not be deleted.
433
+ The name of the column.
434
+ duration (Optional[str]):
435
+ The duration for which to retain data in the table. It may
436
+ also be "forever" to indicate data should not be deleted.
461
437
  """
462
438
 
463
439
  table: str
@@ -525,8 +501,10 @@ class SystemTablesConfig(BaseModel):
525
501
  control plane) will be stored.
526
502
 
527
503
  Attributes:
528
- catalog_name (str): The name of the catalog in which to store data.
529
- var_schema (str): The name of the schema in which to create tables.
504
+ catalog_name (str):
505
+ The name of the catalog in which to store data.
506
+ var_schema (str):
507
+ The name of the schema in which to create tables.
530
508
  """
531
509
 
532
510
  catalog_name: str
@@ -579,33 +557,33 @@ class WorkspaceConfig(BaseModel):
579
557
  General configuration settings for the Workspace.
580
558
 
581
559
  Attributes:
582
- metadata (Optional[Metadata]): Common resource metadata; generally
583
- managed by the control plane.
584
- system_tables_config (SystemTablesConfig): Configuration for the
585
- storage of metadata by the control plane.
586
- default_sql_warehouse (Optional[str]): Default SQL warehouse to use
587
- for executing certain queries. May be overridden in some cases.
560
+ metadata (Optional[Metadata]):
561
+ Common resource metadata; generally managed by the control plane.
562
+ system_tables_config (SystemTablesConfig):
563
+ Configuration for the storage of metadata by the control plane.
564
+ default_sql_warehouse (Optional[str]):
565
+ Default SQL warehouse to use for executing certain queries. May
566
+ be overridden in some cases.
588
567
  detection_rule_metadata (Optional[DetectionRuleMetadata]):
589
- notable_export (Optional[ExportConfig]): Settings related to the
590
- export of notables to various destinations.
591
- operational_alert_export (Optional[ExportConfig]): Settings related
592
- to the export of operational alerts to various destinations.
593
- observables (Optional[WorkspaceConfigObservables]): Declaration of
594
- the types of observables generated by the system.
595
- compute_group_limits (Optional[List[ComputeGroupLimits]]): Limits
596
- on the number of resources placed in a manually specified
597
- compute group - corresponds to the number of resources that
598
- are grouped into a single Job.
599
- dasl_storage_path (Optional[str]): The path to a directory where
600
- DASL can store internal files and state.
601
- default_config (Optional[DefaultConfig]): Configuration settings
602
- regarding storage of bronze, silver, and gold tables and
603
- related assets for each resource type.
604
- managed_retention (Optional[List[ManagedRetention]]): Configuration
605
- of regular cleanup (i.e. pruning) jobs for various catalogs,
606
- schemas, and tables.
607
- status (Optional[ResourceStatus]): Common resource status; wholly
608
- managed by the control plane.
568
+ Detection rule metadata.
569
+ notable_export (Optional[ExportConfig]):
570
+ Settings related to the export of notables to various destinations.
571
+ operational_alert_export (Optional[ExportConfig]):
572
+ Settings related to the export of operational alerts to various
573
+ destinations.
574
+ observables (Optional[WorkspaceConfigObservables]):
575
+ Declaration of the types of observables generated by the system.
576
+ dasl_storage_path (Optional[str]):
577
+ The path to a directory where DASL can store internal files and
578
+ state.
579
+ default_config (Optional[DefaultConfig]):
580
+ Configuration settings regarding storage of bronze, silver, and
581
+ gold tables and related assets for each resource type.
582
+ managed_retention (Optional[List[ManagedRetention]]):
583
+ Configuration of regular cleanup (i.e. pruning) jobs for various
584
+ catalogs, schemas, and tables.
585
+ status (Optional[ResourceStatus]):
586
+ Common resource status; wholly managed by the control plane.
609
587
  """
610
588
 
611
589
  metadata: Optional[Metadata] = None
@@ -615,7 +593,6 @@ class WorkspaceConfig(BaseModel):
615
593
  notable_export: Optional[ExportConfig] = None
616
594
  operational_alert_export: Optional[ExportConfig] = None
617
595
  observables: Optional[WorkspaceConfigObservables] = None
618
- compute_group_limits: Optional[List[ComputeGroupLimits]] = None
619
596
  dasl_storage_path: Optional[str] = None
620
597
  default_config: Optional[DefaultConfig] = None
621
598
  managed_retention: Optional[List[ManagedRetention]] = None
@@ -625,13 +602,6 @@ class WorkspaceConfig(BaseModel):
625
602
  def from_api_obj(obj: WorkspaceV1WorkspaceConfig) -> "WorkspaceConfig":
626
603
  spec = obj.spec
627
604
 
628
- compute_group_limits = None
629
- if spec.compute_group_limits is not None:
630
- compute_group_limits = [
631
- ComputeGroupLimits.from_api_obj(item)
632
- for item in spec.compute_group_limits
633
- ]
634
-
635
605
  managed_retention = None
636
606
  if spec.managed_retention is not None:
637
607
  managed_retention = [
@@ -652,7 +622,6 @@ class WorkspaceConfig(BaseModel):
652
622
  spec.operational_alert_export
653
623
  ),
654
624
  observables=WorkspaceConfigObservables.from_api_obj(spec.observables),
655
- compute_group_limits=compute_group_limits,
656
625
  dasl_storage_path=spec.dasl_storage_path,
657
626
  default_config=DefaultConfig.from_api_obj(spec.default_config),
658
627
  managed_retention=managed_retention,
@@ -660,11 +629,6 @@ class WorkspaceConfig(BaseModel):
660
629
  )
661
630
 
662
631
  def to_api_obj(self) -> WorkspaceV1WorkspaceConfig:
663
- compute_group_limits = None
664
- if self.compute_group_limits is not None:
665
- compute_group_limits = [
666
- item.to_api_obj() for item in self.compute_group_limits
667
- ]
668
632
 
669
633
  managed_retention = None
670
634
  if self.managed_retention is not None:
@@ -687,7 +651,6 @@ class WorkspaceConfig(BaseModel):
687
651
  to_api_obj, self.operational_alert_export
688
652
  ),
689
653
  observables=Helpers.maybe(to_api_obj, self.observables),
690
- compute_group_limits=compute_group_limits,
691
654
  dasl_storage_path=self.dasl_storage_path,
692
655
  default_config=Helpers.maybe(to_api_obj, self.default_config),
693
656
  managed_retention=managed_retention,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dasl_client
3
- Version: 1.0.6
3
+ Version: 1.0.9
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,9 +8,10 @@ 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
11
+ Requires-Dist: dasl-api ==0.1.12
12
12
  Requires-Dist: databricks-sdk >=0.41.0
13
13
  Requires-Dist: pydantic >=2
14
+ Requires-Dist: typing-extensions ==4.10.0
14
15
 
15
16
  # DASL Client Library
16
17
 
@@ -0,0 +1,28 @@
1
+ dasl_client/__init__.py,sha256=E6gOgO8qg96Y38JKA-4LyNBvc2ytQPEfhdniYsCWBxA,127
2
+ dasl_client/client.py,sha256=kiVMMMDYBwuikUSAh855381ou6rHQQjpvqs-zfob0Cc,24092
3
+ dasl_client/helpers.py,sha256=hi_SrFhEqBuLWOteuQlv__Atzq2VMCgY7A8xSt3ztuA,1035
4
+ dasl_client/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ dasl_client/auth/auth.py,sha256=4-vsG3-iAwUIXCrQA_dg-Wf78lk8Na_IbvrOPy70Ub0,7231
6
+ dasl_client/conn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ dasl_client/conn/client_identifier.py,sha256=kPrX0wPa6y7ifhKSb6dQriDSlIgPOUhBq7OoC73E7NU,657
8
+ dasl_client/conn/conn.py,sha256=7o-2qeoVhzULQGW5l6OLYE5dZ60_8OU080ebV_-AW9Q,1433
9
+ dasl_client/errors/__init__.py,sha256=lpH2HGF5kCRTk6MxpPEyY9ulTvsLBFKb4NnLuFFLZZA,40
10
+ dasl_client/errors/errors.py,sha256=u-B8dR8zlxdNVeEdHi6UozX178jwJJ5ZJOGl9YjONRc,4008
11
+ dasl_client/preset_development/__init__.py,sha256=9yC4gmQfombvYLThzo0pSfT5JMolfNVWFVQIuIg_XUA,131
12
+ dasl_client/preset_development/errors.py,sha256=soLSaaWu97vo6LCTUgQw2MZNV06zXsaHoswmzB2I0Mk,5391
13
+ dasl_client/preset_development/preview_engine.py,sha256=JH-iqtACBf8tYIDuQ7gNHeFSobANKU-qSklrYf8G5sg,14162
14
+ dasl_client/preset_development/preview_parameters.py,sha256=KRk3lTImyvJTeEcepwOSokwa4dIQPEgLpQaodHRCEZk,13704
15
+ dasl_client/preset_development/stage.py,sha256=NiDuFiKvoXgqVPPjzB3TZQN1dQeVff6he6oaSVGwkCs,20154
16
+ dasl_client/types/__init__.py,sha256=unYiDRaKPMz_fP8ZNBb4x7PVUR4F9FR4bxRpiTm6prY,147
17
+ dasl_client/types/admin_config.py,sha256=Kmx3Kuai9_LWMeO2NpWasRUgLihYSEXGtuYVfG0FkjU,2200
18
+ dasl_client/types/datasource.py,sha256=-ABmBh5yZwHeY-PKQMnNCNa9FSzod5n1O817m8ZCL6o,52519
19
+ dasl_client/types/dbui.py,sha256=RZV_YxCc5KIHLcDLO5Gb1t3KnS8JKN4PbhnYGsVJiws,13200
20
+ dasl_client/types/helpers.py,sha256=gLGTvrssAKrdkQT9h80twEosld2egwhvj-zAudxWFPs,109
21
+ dasl_client/types/rule.py,sha256=NEdTwU8xtJwJHCv6LQIXVHs90XL6NZRF8auTSKr0ypk,24697
22
+ dasl_client/types/types.py,sha256=DeUOfdYGOhUGEy7yKOfo0OYTXYRrs57yYgNLUbu7Tlc,8806
23
+ dasl_client/types/workspace_config.py,sha256=J2LMustApnwy5yJZCRvB3S7Lh2QncV0I9QcJvGt05lI,24560
24
+ dasl_client-1.0.9.dist-info/LICENSE,sha256=M35UepUPyKmFkvENlkweeaMElheQqNoM5Emh8ADO-rs,4
25
+ dasl_client-1.0.9.dist-info/METADATA,sha256=duz60eVkL8f05wqo3AM7K4K9gTor21V6iTHFGYEUCRI,740
26
+ dasl_client-1.0.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
27
+ dasl_client-1.0.9.dist-info/top_level.txt,sha256=kIv8ox_2oJPjGB8_yuey5vvuPCyfY8kywG138f9oSOY,12
28
+ dasl_client-1.0.9.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- from importlib.metadata import version
2
-
3
-
4
- def get_user_agent() -> str:
5
- """
6
- A helper function defining the user agent for requests originating from
7
- the ASL python conn library. We include the version of the API that the
8
- connection was built off.
9
- :return: A user-agent string.
10
- """
11
- return f"asl-python-conn/{version('dasl_api')}"
@@ -1,23 +0,0 @@
1
- dasl_client/__init__.py,sha256=E6gOgO8qg96Y38JKA-4LyNBvc2ytQPEfhdniYsCWBxA,127
2
- dasl_client/client.py,sha256=KyCjf5QWMFdS-pDBRpLwiHedLmfNw0rAGRy5dKB-OuA,23872
3
- dasl_client/helpers.py,sha256=hi_SrFhEqBuLWOteuQlv__Atzq2VMCgY7A8xSt3ztuA,1035
4
- dasl_client/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- dasl_client/auth/auth.py,sha256=4-vsG3-iAwUIXCrQA_dg-Wf78lk8Na_IbvrOPy70Ub0,7231
6
- dasl_client/conn/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- dasl_client/conn/conn.py,sha256=mOEPfITeqpHrrlFVSlTcFz84mzGNnnOYv-KWIGzmWfU,1426
8
- dasl_client/conn/user_agent.py,sha256=_ai96MJ31NZ1_pGprDqtztAuK5i2_PaqttIJVSSQCZU,354
9
- dasl_client/errors/__init__.py,sha256=lpH2HGF5kCRTk6MxpPEyY9ulTvsLBFKb4NnLuFFLZZA,40
10
- dasl_client/errors/errors.py,sha256=u-B8dR8zlxdNVeEdHi6UozX178jwJJ5ZJOGl9YjONRc,4008
11
- dasl_client/types/__init__.py,sha256=unYiDRaKPMz_fP8ZNBb4x7PVUR4F9FR4bxRpiTm6prY,147
12
- dasl_client/types/admin_config.py,sha256=Giyqe0Llhk-yZ3X4kqtHoGV5DRqzWOfsjIyWRxdpksc,2164
13
- dasl_client/types/datasource.py,sha256=XeECqi7CssFgOZMxCihwGEVWnACKttw6Fpwu1QcVVvA,52760
14
- dasl_client/types/dbui.py,sha256=xgPUGR86PcGWvQa41M70_2NRUwqqB3AokarJlW-PVBA,12914
15
- dasl_client/types/helpers.py,sha256=gLGTvrssAKrdkQT9h80twEosld2egwhvj-zAudxWFPs,109
16
- dasl_client/types/rule.py,sha256=-Qnr744oYGII66ZLIDgnVojo7N3hxlHFhyOAd8UGavw,24001
17
- dasl_client/types/types.py,sha256=yPLle-vic70YjdQUJDe9P-uqv2E2H5R5xVF-IlEUJnc,8297
18
- dasl_client/types/workspace_config.py,sha256=Gx8dSO9epyFkIF7WXCz18AhxehZ7_zGyuTtHvLqfn4w,26151
19
- dasl_client-1.0.6.dist-info/LICENSE,sha256=M35UepUPyKmFkvENlkweeaMElheQqNoM5Emh8ADO-rs,4
20
- dasl_client-1.0.6.dist-info/METADATA,sha256=52FE2_eapUgt1NuSNb2VHOjg4xeVz8_1lNLZ85iigNo,698
21
- dasl_client-1.0.6.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
22
- dasl_client-1.0.6.dist-info/top_level.txt,sha256=kIv8ox_2oJPjGB8_yuey5vvuPCyfY8kywG138f9oSOY,12
23
- dasl_client-1.0.6.dist-info/RECORD,,