databricks-sdk 0.0.7__py3-none-any.whl → 0.1.1__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 databricks-sdk might be problematic. Click here for more details.

Files changed (41) hide show
  1. databricks/sdk/__init__.py +121 -104
  2. databricks/sdk/core.py +76 -16
  3. databricks/sdk/dbutils.py +18 -17
  4. databricks/sdk/mixins/compute.py +6 -6
  5. databricks/sdk/mixins/dbfs.py +6 -6
  6. databricks/sdk/oauth.py +28 -14
  7. databricks/sdk/service/{unitycatalog.py → catalog.py} +375 -1146
  8. databricks/sdk/service/{clusters.py → compute.py} +2176 -61
  9. databricks/sdk/service/{dbfs.py → files.py} +6 -6
  10. databricks/sdk/service/{scim.py → iam.py} +567 -27
  11. databricks/sdk/service/jobs.py +44 -34
  12. databricks/sdk/service/{mlflow.py → ml.py} +976 -1071
  13. databricks/sdk/service/oauth2.py +3 -3
  14. databricks/sdk/service/pipelines.py +46 -30
  15. databricks/sdk/service/{deployment.py → provisioning.py} +47 -29
  16. databricks/sdk/service/settings.py +849 -0
  17. databricks/sdk/service/sharing.py +1176 -0
  18. databricks/sdk/service/sql.py +15 -15
  19. databricks/sdk/service/workspace.py +917 -22
  20. databricks/sdk/version.py +1 -1
  21. {databricks_sdk-0.0.7.dist-info → databricks_sdk-0.1.1.dist-info}/METADATA +3 -1
  22. databricks_sdk-0.1.1.dist-info/RECORD +37 -0
  23. databricks/sdk/service/clusterpolicies.py +0 -399
  24. databricks/sdk/service/commands.py +0 -478
  25. databricks/sdk/service/gitcredentials.py +0 -202
  26. databricks/sdk/service/globalinitscripts.py +0 -262
  27. databricks/sdk/service/instancepools.py +0 -757
  28. databricks/sdk/service/ipaccesslists.py +0 -340
  29. databricks/sdk/service/libraries.py +0 -282
  30. databricks/sdk/service/permissions.py +0 -470
  31. databricks/sdk/service/repos.py +0 -250
  32. databricks/sdk/service/secrets.py +0 -472
  33. databricks/sdk/service/tokenmanagement.py +0 -182
  34. databricks/sdk/service/tokens.py +0 -137
  35. databricks/sdk/service/workspaceconf.py +0 -50
  36. databricks_sdk-0.0.7.dist-info/RECORD +0 -48
  37. /databricks/sdk/service/{endpoints.py → serving.py} +0 -0
  38. {databricks_sdk-0.0.7.dist-info → databricks_sdk-0.1.1.dist-info}/LICENSE +0 -0
  39. {databricks_sdk-0.0.7.dist-info → databricks_sdk-0.1.1.dist-info}/NOTICE +0 -0
  40. {databricks_sdk-0.0.7.dist-info → databricks_sdk-0.1.1.dist-info}/WHEEL +0 -0
  41. {databricks_sdk-0.0.7.dist-info → databricks_sdk-0.1.1.dist-info}/top_level.txt +0 -0
@@ -13,9 +13,8 @@ from ._internal import Wait, _enum, _from_dict, _repeated
13
13
 
14
14
  _LOG = logging.getLogger('databricks.sdk')
15
15
 
16
- from .clusters import BaseClusterInfo
17
- from .libraries import Library
18
- from .permissions import AccessControlRequest
16
+ from .compute import BaseClusterInfo, Library
17
+ from .iam import AccessControlRequest
19
18
 
20
19
  # all definitions in this file are in alphabetical order
21
20
 
@@ -390,14 +389,6 @@ class DeleteRun:
390
389
  return cls(run_id=d.get('run_id', None))
391
390
 
392
391
 
393
- @dataclass
394
- class ExportRun:
395
- """Export and retrieve a job run"""
396
-
397
- run_id: int
398
- views_to_export: 'ViewsToExport' = None
399
-
400
-
401
392
  @dataclass
402
393
  class ExportRunOutput:
403
394
  views: 'List[ViewItem]' = None
@@ -412,6 +403,14 @@ class ExportRunOutput:
412
403
  return cls(views=_repeated(d, 'views', ViewItem))
413
404
 
414
405
 
406
+ @dataclass
407
+ class ExportRunRequest:
408
+ """Export and retrieve a job run"""
409
+
410
+ run_id: int
411
+ views_to_export: 'ViewsToExport' = None
412
+
413
+
415
414
  @dataclass
416
415
  class FileArrivalTriggerSettings:
417
416
  min_time_between_trigger_seconds: int = None
@@ -435,25 +434,25 @@ class FileArrivalTriggerSettings:
435
434
 
436
435
 
437
436
  @dataclass
438
- class Get:
437
+ class GetJobRequest:
439
438
  """Get a single job"""
440
439
 
441
440
  job_id: int
442
441
 
443
442
 
444
443
  @dataclass
445
- class GetRun:
446
- """Get a single job run"""
444
+ class GetRunOutputRequest:
445
+ """Get the output for a single run"""
447
446
 
448
447
  run_id: int
449
- include_history: bool = None
450
448
 
451
449
 
452
450
  @dataclass
453
- class GetRunOutput:
454
- """Get the output for a single run"""
451
+ class GetRunRequest:
452
+ """Get a single job run"""
455
453
 
456
454
  run_id: int
455
+ include_history: bool = None
457
456
 
458
457
 
459
458
  @dataclass
@@ -779,7 +778,7 @@ class JobWebhookNotificationsOnSuccessItem:
779
778
 
780
779
 
781
780
  @dataclass
782
- class ListRequest:
781
+ class ListJobsRequest:
783
782
  """List all jobs"""
784
783
 
785
784
  expand_tasks: bool = None
@@ -805,7 +804,7 @@ class ListJobsResponse:
805
804
 
806
805
 
807
806
  @dataclass
808
- class ListRuns:
807
+ class ListRunsRequest:
809
808
  """List runs for a job"""
810
809
 
811
810
  active_only: bool = None
@@ -1478,16 +1477,27 @@ class SparkJarTask:
1478
1477
  class SparkPythonTask:
1479
1478
  python_file: str
1480
1479
  parameters: 'List[str]' = None
1480
+ source: 'SparkPythonTaskSource' = None
1481
1481
 
1482
1482
  def as_dict(self) -> dict:
1483
1483
  body = {}
1484
1484
  if self.parameters: body['parameters'] = [v for v in self.parameters]
1485
1485
  if self.python_file: body['python_file'] = self.python_file
1486
+ if self.source: body['source'] = self.source.value
1486
1487
  return body
1487
1488
 
1488
1489
  @classmethod
1489
1490
  def from_dict(cls, d: Dict[str, any]) -> 'SparkPythonTask':
1490
- return cls(parameters=d.get('parameters', None), python_file=d.get('python_file', None))
1491
+ return cls(parameters=d.get('parameters', None),
1492
+ python_file=d.get('python_file', None),
1493
+ source=_enum(d, 'source', SparkPythonTaskSource))
1494
+
1495
+
1496
+ class SparkPythonTaskSource(Enum):
1497
+ """This describes an enum"""
1498
+
1499
+ GIT = 'GIT'
1500
+ WORKSPACE = 'WORKSPACE'
1491
1501
 
1492
1502
 
1493
1503
  @dataclass
@@ -2100,7 +2110,7 @@ class JobsAPI:
2100
2110
  Export and retrieve the job run task."""
2101
2111
  request = kwargs.get('request', None)
2102
2112
  if not request: # request is not given through keyed args
2103
- request = ExportRun(run_id=run_id, views_to_export=views_to_export)
2113
+ request = ExportRunRequest(run_id=run_id, views_to_export=views_to_export)
2104
2114
 
2105
2115
  query = {}
2106
2116
  if run_id: query['run_id'] = request.run_id
@@ -2115,7 +2125,7 @@ class JobsAPI:
2115
2125
  Retrieves the details for a single job."""
2116
2126
  request = kwargs.get('request', None)
2117
2127
  if not request: # request is not given through keyed args
2118
- request = Get(job_id=job_id)
2128
+ request = GetJobRequest(job_id=job_id)
2119
2129
 
2120
2130
  query = {}
2121
2131
  if job_id: query['job_id'] = request.job_id
@@ -2129,7 +2139,7 @@ class JobsAPI:
2129
2139
  Retrieve the metadata of a run."""
2130
2140
  request = kwargs.get('request', None)
2131
2141
  if not request: # request is not given through keyed args
2132
- request = GetRun(include_history=include_history, run_id=run_id)
2142
+ request = GetRunRequest(include_history=include_history, run_id=run_id)
2133
2143
 
2134
2144
  query = {}
2135
2145
  if include_history: query['include_history'] = request.include_history
@@ -2151,7 +2161,7 @@ class JobsAPI:
2151
2161
  reference them beyond 60 days, you must save old run results before they expire."""
2152
2162
  request = kwargs.get('request', None)
2153
2163
  if not request: # request is not given through keyed args
2154
- request = GetRunOutput(run_id=run_id)
2164
+ request = GetRunOutputRequest(run_id=run_id)
2155
2165
 
2156
2166
  query = {}
2157
2167
  if run_id: query['run_id'] = request.run_id
@@ -2171,7 +2181,7 @@ class JobsAPI:
2171
2181
  Retrieves a list of jobs."""
2172
2182
  request = kwargs.get('request', None)
2173
2183
  if not request: # request is not given through keyed args
2174
- request = ListRequest(expand_tasks=expand_tasks, limit=limit, name=name, offset=offset)
2184
+ request = ListJobsRequest(expand_tasks=expand_tasks, limit=limit, name=name, offset=offset)
2175
2185
 
2176
2186
  query = {}
2177
2187
  if expand_tasks: query['expand_tasks'] = request.expand_tasks
@@ -2211,15 +2221,15 @@ class JobsAPI:
2211
2221
  List runs in descending order by start time."""
2212
2222
  request = kwargs.get('request', None)
2213
2223
  if not request: # request is not given through keyed args
2214
- request = ListRuns(active_only=active_only,
2215
- completed_only=completed_only,
2216
- expand_tasks=expand_tasks,
2217
- job_id=job_id,
2218
- limit=limit,
2219
- offset=offset,
2220
- run_type=run_type,
2221
- start_time_from=start_time_from,
2222
- start_time_to=start_time_to)
2224
+ request = ListRunsRequest(active_only=active_only,
2225
+ completed_only=completed_only,
2226
+ expand_tasks=expand_tasks,
2227
+ job_id=job_id,
2228
+ limit=limit,
2229
+ offset=offset,
2230
+ run_type=run_type,
2231
+ start_time_from=start_time_from,
2232
+ start_time_to=start_time_to)
2223
2233
 
2224
2234
  query = {}
2225
2235
  if active_only: query['active_only'] = request.active_only