databricks-sdk 0.44.1__py3-none-any.whl → 0.46.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.
Potentially problematic release.
This version of databricks-sdk might be problematic. Click here for more details.
- databricks/sdk/__init__.py +135 -116
- databricks/sdk/_base_client.py +112 -88
- databricks/sdk/_property.py +12 -7
- databricks/sdk/_widgets/__init__.py +13 -2
- databricks/sdk/_widgets/default_widgets_utils.py +21 -15
- databricks/sdk/_widgets/ipywidgets_utils.py +47 -24
- databricks/sdk/azure.py +8 -6
- databricks/sdk/casing.py +5 -5
- databricks/sdk/config.py +156 -99
- databricks/sdk/core.py +57 -47
- databricks/sdk/credentials_provider.py +306 -206
- databricks/sdk/data_plane.py +75 -50
- databricks/sdk/dbutils.py +123 -87
- databricks/sdk/environments.py +52 -35
- databricks/sdk/errors/base.py +61 -35
- databricks/sdk/errors/customizer.py +3 -3
- databricks/sdk/errors/deserializer.py +38 -25
- databricks/sdk/errors/details.py +417 -0
- databricks/sdk/errors/mapper.py +1 -1
- databricks/sdk/errors/overrides.py +27 -24
- databricks/sdk/errors/parser.py +26 -14
- databricks/sdk/errors/platform.py +10 -10
- databricks/sdk/errors/private_link.py +24 -24
- databricks/sdk/logger/round_trip_logger.py +28 -20
- databricks/sdk/mixins/compute.py +90 -60
- databricks/sdk/mixins/files.py +815 -145
- databricks/sdk/mixins/jobs.py +191 -16
- databricks/sdk/mixins/open_ai_client.py +26 -20
- databricks/sdk/mixins/workspace.py +45 -34
- databricks/sdk/oauth.py +379 -198
- databricks/sdk/retries.py +14 -12
- databricks/sdk/runtime/__init__.py +34 -17
- databricks/sdk/runtime/dbutils_stub.py +52 -39
- databricks/sdk/service/_internal.py +12 -7
- databricks/sdk/service/apps.py +618 -418
- databricks/sdk/service/billing.py +827 -604
- databricks/sdk/service/catalog.py +6552 -4474
- databricks/sdk/service/cleanrooms.py +550 -388
- databricks/sdk/service/compute.py +5263 -3536
- databricks/sdk/service/dashboards.py +1331 -924
- databricks/sdk/service/files.py +446 -309
- databricks/sdk/service/iam.py +2115 -1483
- databricks/sdk/service/jobs.py +4151 -2588
- databricks/sdk/service/marketplace.py +2210 -1517
- databricks/sdk/service/ml.py +3839 -2256
- databricks/sdk/service/oauth2.py +910 -584
- databricks/sdk/service/pipelines.py +1865 -1203
- databricks/sdk/service/provisioning.py +1435 -1029
- databricks/sdk/service/serving.py +2060 -1290
- databricks/sdk/service/settings.py +2846 -1929
- databricks/sdk/service/sharing.py +2201 -877
- databricks/sdk/service/sql.py +4650 -3103
- databricks/sdk/service/vectorsearch.py +816 -550
- databricks/sdk/service/workspace.py +1330 -906
- databricks/sdk/useragent.py +36 -22
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/METADATA +31 -31
- databricks_sdk-0.46.0.dist-info/RECORD +70 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/WHEEL +1 -1
- databricks_sdk-0.44.1.dist-info/RECORD +0 -69
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/LICENSE +0 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/NOTICE +0 -0
- {databricks_sdk-0.44.1.dist-info → databricks_sdk-0.46.0.dist-info}/top_level.txt +0 -0
databricks/sdk/__init__.py
CHANGED
|
@@ -8,6 +8,7 @@ import databricks.sdk.dbutils as dbutils
|
|
|
8
8
|
import databricks.sdk.service as service
|
|
9
9
|
from databricks.sdk import azure
|
|
10
10
|
from databricks.sdk.credentials_provider import CredentialsStrategy
|
|
11
|
+
from databricks.sdk.data_plane import DataPlaneTokenSource
|
|
11
12
|
from databricks.sdk.mixins.compute import ClustersExt
|
|
12
13
|
from databricks.sdk.mixins.files import DbfsExt, FilesExt
|
|
13
14
|
from databricks.sdk.mixins.jobs import JobsExt
|
|
@@ -63,7 +64,8 @@ from databricks.sdk.service.marketplace import (
|
|
|
63
64
|
ProviderExchangeFiltersAPI, ProviderExchangesAPI, ProviderFilesAPI,
|
|
64
65
|
ProviderListingsAPI, ProviderPersonalizationRequestsAPI,
|
|
65
66
|
ProviderProviderAnalyticsDashboardsAPI, ProviderProvidersAPI)
|
|
66
|
-
from databricks.sdk.service.ml import ExperimentsAPI,
|
|
67
|
+
from databricks.sdk.service.ml import (ExperimentsAPI, ForecastingAPI,
|
|
68
|
+
ModelRegistryAPI)
|
|
67
69
|
from databricks.sdk.service.oauth2 import (AccountFederationPolicyAPI,
|
|
68
70
|
CustomAppIntegrationAPI,
|
|
69
71
|
OAuthPublishedAppsAPI,
|
|
@@ -122,6 +124,7 @@ def _make_dbutils(config: client.Config):
|
|
|
122
124
|
|
|
123
125
|
# We are in runtime, so we can use the runtime dbutils
|
|
124
126
|
from databricks.sdk.runtime import dbutils as runtime_dbutils
|
|
127
|
+
|
|
125
128
|
return runtime_dbutils
|
|
126
129
|
|
|
127
130
|
|
|
@@ -138,58 +141,62 @@ class WorkspaceClient:
|
|
|
138
141
|
The WorkspaceClient is a client for the workspace-level Databricks REST API.
|
|
139
142
|
"""
|
|
140
143
|
|
|
141
|
-
def __init__(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
144
|
+
def __init__(
|
|
145
|
+
self,
|
|
146
|
+
*,
|
|
147
|
+
host: Optional[str] = None,
|
|
148
|
+
account_id: Optional[str] = None,
|
|
149
|
+
username: Optional[str] = None,
|
|
150
|
+
password: Optional[str] = None,
|
|
151
|
+
client_id: Optional[str] = None,
|
|
152
|
+
client_secret: Optional[str] = None,
|
|
153
|
+
token: Optional[str] = None,
|
|
154
|
+
profile: Optional[str] = None,
|
|
155
|
+
config_file: Optional[str] = None,
|
|
156
|
+
azure_workspace_resource_id: Optional[str] = None,
|
|
157
|
+
azure_client_secret: Optional[str] = None,
|
|
158
|
+
azure_client_id: Optional[str] = None,
|
|
159
|
+
azure_tenant_id: Optional[str] = None,
|
|
160
|
+
azure_environment: Optional[str] = None,
|
|
161
|
+
auth_type: Optional[str] = None,
|
|
162
|
+
cluster_id: Optional[str] = None,
|
|
163
|
+
google_credentials: Optional[str] = None,
|
|
164
|
+
google_service_account: Optional[str] = None,
|
|
165
|
+
debug_truncate_bytes: Optional[int] = None,
|
|
166
|
+
debug_headers: Optional[bool] = None,
|
|
167
|
+
product="unknown",
|
|
168
|
+
product_version="0.0.0",
|
|
169
|
+
credentials_strategy: Optional[CredentialsStrategy] = None,
|
|
170
|
+
credentials_provider: Optional[CredentialsStrategy] = None,
|
|
171
|
+
config: Optional[client.Config] = None,
|
|
172
|
+
):
|
|
168
173
|
if not config:
|
|
169
|
-
config = client.Config(
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
174
|
+
config = client.Config(
|
|
175
|
+
host=host,
|
|
176
|
+
account_id=account_id,
|
|
177
|
+
username=username,
|
|
178
|
+
password=password,
|
|
179
|
+
client_id=client_id,
|
|
180
|
+
client_secret=client_secret,
|
|
181
|
+
token=token,
|
|
182
|
+
profile=profile,
|
|
183
|
+
config_file=config_file,
|
|
184
|
+
azure_workspace_resource_id=azure_workspace_resource_id,
|
|
185
|
+
azure_client_secret=azure_client_secret,
|
|
186
|
+
azure_client_id=azure_client_id,
|
|
187
|
+
azure_tenant_id=azure_tenant_id,
|
|
188
|
+
azure_environment=azure_environment,
|
|
189
|
+
auth_type=auth_type,
|
|
190
|
+
cluster_id=cluster_id,
|
|
191
|
+
google_credentials=google_credentials,
|
|
192
|
+
google_service_account=google_service_account,
|
|
193
|
+
credentials_strategy=credentials_strategy,
|
|
194
|
+
credentials_provider=credentials_provider,
|
|
195
|
+
debug_truncate_bytes=debug_truncate_bytes,
|
|
196
|
+
debug_headers=debug_headers,
|
|
197
|
+
product=product,
|
|
198
|
+
product_version=product_version,
|
|
199
|
+
)
|
|
193
200
|
self._config = config.copy()
|
|
194
201
|
self._dbutils = _make_dbutils(self._config)
|
|
195
202
|
self._api_client = client.ApiClient(self._config)
|
|
@@ -212,7 +219,8 @@ class WorkspaceClient:
|
|
|
212
219
|
self._consumer_installations = service.marketplace.ConsumerInstallationsAPI(self._api_client)
|
|
213
220
|
self._consumer_listings = service.marketplace.ConsumerListingsAPI(self._api_client)
|
|
214
221
|
self._consumer_personalization_requests = service.marketplace.ConsumerPersonalizationRequestsAPI(
|
|
215
|
-
self._api_client
|
|
222
|
+
self._api_client
|
|
223
|
+
)
|
|
216
224
|
self._consumer_providers = service.marketplace.ConsumerProvidersAPI(self._api_client)
|
|
217
225
|
self._credentials = service.catalog.CredentialsAPI(self._api_client)
|
|
218
226
|
self._credentials_manager = service.settings.CredentialsManagerAPI(self._api_client)
|
|
@@ -246,8 +254,7 @@ class WorkspaceClient:
|
|
|
246
254
|
self._permission_migration = service.iam.PermissionMigrationAPI(self._api_client)
|
|
247
255
|
self._permissions = service.iam.PermissionsAPI(self._api_client)
|
|
248
256
|
self._pipelines = service.pipelines.PipelinesAPI(self._api_client)
|
|
249
|
-
self._policy_compliance_for_clusters = service.compute.PolicyComplianceForClustersAPI(
|
|
250
|
-
self._api_client)
|
|
257
|
+
self._policy_compliance_for_clusters = service.compute.PolicyComplianceForClustersAPI(self._api_client)
|
|
251
258
|
self._policy_compliance_for_jobs = service.jobs.PolicyComplianceForJobsAPI(self._api_client)
|
|
252
259
|
self._policy_families = service.compute.PolicyFamiliesAPI(self._api_client)
|
|
253
260
|
self._provider_exchange_filters = service.marketplace.ProviderExchangeFiltersAPI(self._api_client)
|
|
@@ -255,9 +262,11 @@ class WorkspaceClient:
|
|
|
255
262
|
self._provider_files = service.marketplace.ProviderFilesAPI(self._api_client)
|
|
256
263
|
self._provider_listings = service.marketplace.ProviderListingsAPI(self._api_client)
|
|
257
264
|
self._provider_personalization_requests = service.marketplace.ProviderPersonalizationRequestsAPI(
|
|
258
|
-
self._api_client
|
|
265
|
+
self._api_client
|
|
266
|
+
)
|
|
259
267
|
self._provider_provider_analytics_dashboards = service.marketplace.ProviderProviderAnalyticsDashboardsAPI(
|
|
260
|
-
self._api_client
|
|
268
|
+
self._api_client
|
|
269
|
+
)
|
|
261
270
|
self._provider_providers = service.marketplace.ProviderProvidersAPI(self._api_client)
|
|
262
271
|
self._providers = service.sharing.ProvidersAPI(self._api_client)
|
|
263
272
|
self._quality_monitors = service.catalog.QualityMonitorsAPI(self._api_client)
|
|
@@ -277,8 +286,12 @@ class WorkspaceClient:
|
|
|
277
286
|
self._secrets = service.workspace.SecretsAPI(self._api_client)
|
|
278
287
|
self._service_principals = service.iam.ServicePrincipalsAPI(self._api_client)
|
|
279
288
|
self._serving_endpoints = serving_endpoints
|
|
289
|
+
serving_endpoints_data_plane_token_source = DataPlaneTokenSource(
|
|
290
|
+
self._config.host, self._config.oauth_token, not self._config.enable_experimental_async_token_refresh
|
|
291
|
+
)
|
|
280
292
|
self._serving_endpoints_data_plane = service.serving.ServingEndpointsDataPlaneAPI(
|
|
281
|
-
self._api_client, serving_endpoints
|
|
293
|
+
self._api_client, serving_endpoints, serving_endpoints_data_plane_token_source
|
|
294
|
+
)
|
|
282
295
|
self._settings = service.settings.SettingsAPI(self._api_client)
|
|
283
296
|
self._shares = service.sharing.SharesAPI(self._api_client)
|
|
284
297
|
self._statement_execution = service.sql.StatementExecutionAPI(self._api_client)
|
|
@@ -297,6 +310,7 @@ class WorkspaceClient:
|
|
|
297
310
|
self._workspace = WorkspaceExt(self._api_client)
|
|
298
311
|
self._workspace_bindings = service.catalog.WorkspaceBindingsAPI(self._api_client)
|
|
299
312
|
self._workspace_conf = service.settings.WorkspaceConfAPI(self._api_client)
|
|
313
|
+
self._forecasting = service.ml.ForecastingAPI(self._api_client)
|
|
300
314
|
|
|
301
315
|
@property
|
|
302
316
|
def config(self) -> client.Config:
|
|
@@ -606,8 +620,7 @@ class WorkspaceClient:
|
|
|
606
620
|
return self._provider_personalization_requests
|
|
607
621
|
|
|
608
622
|
@property
|
|
609
|
-
def provider_provider_analytics_dashboards(
|
|
610
|
-
self) -> service.marketplace.ProviderProviderAnalyticsDashboardsAPI:
|
|
623
|
+
def provider_provider_analytics_dashboards(self) -> service.marketplace.ProviderProviderAnalyticsDashboardsAPI:
|
|
611
624
|
"""Manage templated analytics solution for providers."""
|
|
612
625
|
return self._provider_provider_analytics_dashboards
|
|
613
626
|
|
|
@@ -801,11 +814,14 @@ class WorkspaceClient:
|
|
|
801
814
|
"""This API allows updating known workspace settings for advanced users."""
|
|
802
815
|
return self._workspace_conf
|
|
803
816
|
|
|
817
|
+
@property
|
|
818
|
+
def forecasting(self) -> service.ml.ForecastingAPI:
|
|
819
|
+
"""The Forecasting API allows you to create and get serverless forecasting experiments."""
|
|
820
|
+
return self._forecasting
|
|
821
|
+
|
|
804
822
|
def get_workspace_id(self) -> int:
|
|
805
823
|
"""Get the workspace ID of the workspace that this client is connected to."""
|
|
806
|
-
response = self._api_client.do("GET",
|
|
807
|
-
"/api/2.0/preview/scim/v2/Me",
|
|
808
|
-
response_headers=['X-Databricks-Org-Id'])
|
|
824
|
+
response = self._api_client.do("GET", "/api/2.0/preview/scim/v2/Me", response_headers=["X-Databricks-Org-Id"])
|
|
809
825
|
return int(response["X-Databricks-Org-Id"])
|
|
810
826
|
|
|
811
827
|
def __repr__(self):
|
|
@@ -817,58 +833,62 @@ class AccountClient:
|
|
|
817
833
|
The AccountClient is a client for the account-level Databricks REST API.
|
|
818
834
|
"""
|
|
819
835
|
|
|
820
|
-
def __init__(
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
836
|
+
def __init__(
|
|
837
|
+
self,
|
|
838
|
+
*,
|
|
839
|
+
host: Optional[str] = None,
|
|
840
|
+
account_id: Optional[str] = None,
|
|
841
|
+
username: Optional[str] = None,
|
|
842
|
+
password: Optional[str] = None,
|
|
843
|
+
client_id: Optional[str] = None,
|
|
844
|
+
client_secret: Optional[str] = None,
|
|
845
|
+
token: Optional[str] = None,
|
|
846
|
+
profile: Optional[str] = None,
|
|
847
|
+
config_file: Optional[str] = None,
|
|
848
|
+
azure_workspace_resource_id: Optional[str] = None,
|
|
849
|
+
azure_client_secret: Optional[str] = None,
|
|
850
|
+
azure_client_id: Optional[str] = None,
|
|
851
|
+
azure_tenant_id: Optional[str] = None,
|
|
852
|
+
azure_environment: Optional[str] = None,
|
|
853
|
+
auth_type: Optional[str] = None,
|
|
854
|
+
cluster_id: Optional[str] = None,
|
|
855
|
+
google_credentials: Optional[str] = None,
|
|
856
|
+
google_service_account: Optional[str] = None,
|
|
857
|
+
debug_truncate_bytes: Optional[int] = None,
|
|
858
|
+
debug_headers: Optional[bool] = None,
|
|
859
|
+
product="unknown",
|
|
860
|
+
product_version="0.0.0",
|
|
861
|
+
credentials_strategy: Optional[CredentialsStrategy] = None,
|
|
862
|
+
credentials_provider: Optional[CredentialsStrategy] = None,
|
|
863
|
+
config: Optional[client.Config] = None,
|
|
864
|
+
):
|
|
847
865
|
if not config:
|
|
848
|
-
config = client.Config(
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
866
|
+
config = client.Config(
|
|
867
|
+
host=host,
|
|
868
|
+
account_id=account_id,
|
|
869
|
+
username=username,
|
|
870
|
+
password=password,
|
|
871
|
+
client_id=client_id,
|
|
872
|
+
client_secret=client_secret,
|
|
873
|
+
token=token,
|
|
874
|
+
profile=profile,
|
|
875
|
+
config_file=config_file,
|
|
876
|
+
azure_workspace_resource_id=azure_workspace_resource_id,
|
|
877
|
+
azure_client_secret=azure_client_secret,
|
|
878
|
+
azure_client_id=azure_client_id,
|
|
879
|
+
azure_tenant_id=azure_tenant_id,
|
|
880
|
+
azure_environment=azure_environment,
|
|
881
|
+
auth_type=auth_type,
|
|
882
|
+
cluster_id=cluster_id,
|
|
883
|
+
google_credentials=google_credentials,
|
|
884
|
+
google_service_account=google_service_account,
|
|
885
|
+
credentials_strategy=credentials_strategy,
|
|
886
|
+
credentials_provider=credentials_provider,
|
|
887
|
+
debug_truncate_bytes=debug_truncate_bytes,
|
|
888
|
+
debug_headers=debug_headers,
|
|
889
|
+
product=product,
|
|
890
|
+
product_version=product_version,
|
|
891
|
+
)
|
|
872
892
|
self._config = config.copy()
|
|
873
893
|
self._api_client = client.ApiClient(self._config)
|
|
874
894
|
self._access_control = service.iam.AccountAccessControlAPI(self._api_client)
|
|
@@ -888,8 +908,7 @@ class AccountClient:
|
|
|
888
908
|
self._o_auth_published_apps = service.oauth2.OAuthPublishedAppsAPI(self._api_client)
|
|
889
909
|
self._private_access = service.provisioning.PrivateAccessAPI(self._api_client)
|
|
890
910
|
self._published_app_integration = service.oauth2.PublishedAppIntegrationAPI(self._api_client)
|
|
891
|
-
self._service_principal_federation_policy = service.oauth2.ServicePrincipalFederationPolicyAPI(
|
|
892
|
-
self._api_client)
|
|
911
|
+
self._service_principal_federation_policy = service.oauth2.ServicePrincipalFederationPolicyAPI(self._api_client)
|
|
893
912
|
self._service_principal_secrets = service.oauth2.ServicePrincipalSecretsAPI(self._api_client)
|
|
894
913
|
self._service_principals = service.iam.AccountServicePrincipalsAPI(self._api_client)
|
|
895
914
|
self._settings = service.settings.AccountSettingsAPI(self._api_client)
|