databricks-sdk 0.56.0__py3-none-any.whl → 0.58.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 +38 -11
- databricks/sdk/service/aibuilder.py +122 -17
- databricks/sdk/service/apps.py +15 -45
- databricks/sdk/service/billing.py +70 -74
- databricks/sdk/service/catalog.py +1898 -557
- databricks/sdk/service/cleanrooms.py +14 -55
- databricks/sdk/service/compute.py +305 -508
- databricks/sdk/service/dashboards.py +148 -223
- databricks/sdk/service/database.py +657 -127
- databricks/sdk/service/files.py +18 -54
- databricks/sdk/service/iam.py +55 -165
- databricks/sdk/service/jobs.py +238 -214
- databricks/sdk/service/marketplace.py +47 -146
- databricks/sdk/service/ml.py +1137 -447
- databricks/sdk/service/oauth2.py +17 -46
- databricks/sdk/service/pipelines.py +93 -69
- databricks/sdk/service/provisioning.py +34 -212
- databricks/sdk/service/qualitymonitorv2.py +5 -33
- databricks/sdk/service/serving.py +69 -55
- databricks/sdk/service/settings.py +106 -434
- databricks/sdk/service/sharing.py +33 -95
- databricks/sdk/service/sql.py +164 -254
- databricks/sdk/service/vectorsearch.py +13 -62
- databricks/sdk/service/workspace.py +36 -110
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/RECORD +31 -31
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.56.0.dist-info → databricks_sdk-0.58.0.dist-info}/top_level.txt +0 -0
databricks/sdk/service/files.py
CHANGED
|
@@ -739,9 +739,7 @@ class DbfsAPI:
|
|
|
739
739
|
self._api = api_client
|
|
740
740
|
|
|
741
741
|
def add_block(self, handle: int, data: str):
|
|
742
|
-
"""
|
|
743
|
-
|
|
744
|
-
Appends a block of data to the stream specified by the input handle. If the handle does not exist,
|
|
742
|
+
"""Appends a block of data to the stream specified by the input handle. If the handle does not exist,
|
|
745
743
|
this call will throw an exception with ``RESOURCE_DOES_NOT_EXIST``.
|
|
746
744
|
|
|
747
745
|
If the block of data exceeds 1 MB, this call will throw an exception with ``MAX_BLOCK_SIZE_EXCEEDED``.
|
|
@@ -766,9 +764,7 @@ class DbfsAPI:
|
|
|
766
764
|
self._api.do("POST", "/api/2.0/dbfs/add-block", body=body, headers=headers)
|
|
767
765
|
|
|
768
766
|
def close(self, handle: int):
|
|
769
|
-
"""
|
|
770
|
-
|
|
771
|
-
Closes the stream specified by the input handle. If the handle does not exist, this call throws an
|
|
767
|
+
"""Closes the stream specified by the input handle. If the handle does not exist, this call throws an
|
|
772
768
|
exception with ``RESOURCE_DOES_NOT_EXIST``.
|
|
773
769
|
|
|
774
770
|
:param handle: int
|
|
@@ -787,9 +783,7 @@ class DbfsAPI:
|
|
|
787
783
|
self._api.do("POST", "/api/2.0/dbfs/close", body=body, headers=headers)
|
|
788
784
|
|
|
789
785
|
def create(self, path: str, *, overwrite: Optional[bool] = None) -> CreateResponse:
|
|
790
|
-
"""
|
|
791
|
-
|
|
792
|
-
Opens a stream to write to a file and returns a handle to this stream. There is a 10 minute idle
|
|
786
|
+
"""Opens a stream to write to a file and returns a handle to this stream. There is a 10 minute idle
|
|
793
787
|
timeout on this handle. If a file or directory already exists on the given path and __overwrite__ is
|
|
794
788
|
set to false, this call will throw an exception with ``RESOURCE_ALREADY_EXISTS``.
|
|
795
789
|
|
|
@@ -819,9 +813,7 @@ class DbfsAPI:
|
|
|
819
813
|
return CreateResponse.from_dict(res)
|
|
820
814
|
|
|
821
815
|
def delete(self, path: str, *, recursive: Optional[bool] = None):
|
|
822
|
-
"""Delete
|
|
823
|
-
|
|
824
|
-
Delete the file or directory (optionally recursively delete all files in the directory). This call
|
|
816
|
+
"""Delete the file or directory (optionally recursively delete all files in the directory). This call
|
|
825
817
|
throws an exception with `IO_ERROR` if the path is a non-empty directory and `recursive` is set to
|
|
826
818
|
`false` or on other similar errors.
|
|
827
819
|
|
|
@@ -857,9 +849,7 @@ class DbfsAPI:
|
|
|
857
849
|
self._api.do("POST", "/api/2.0/dbfs/delete", body=body, headers=headers)
|
|
858
850
|
|
|
859
851
|
def get_status(self, path: str) -> FileInfo:
|
|
860
|
-
"""
|
|
861
|
-
|
|
862
|
-
Gets the file information for a file or directory. If the file or directory does not exist, this call
|
|
852
|
+
"""Gets the file information for a file or directory. If the file or directory does not exist, this call
|
|
863
853
|
throws an exception with `RESOURCE_DOES_NOT_EXIST`.
|
|
864
854
|
|
|
865
855
|
:param path: str
|
|
@@ -879,9 +869,7 @@ class DbfsAPI:
|
|
|
879
869
|
return FileInfo.from_dict(res)
|
|
880
870
|
|
|
881
871
|
def list(self, path: str) -> Iterator[FileInfo]:
|
|
882
|
-
"""List
|
|
883
|
-
|
|
884
|
-
List the contents of a directory, or details of the file. If the file or directory does not exist,
|
|
872
|
+
"""List the contents of a directory, or details of the file. If the file or directory does not exist,
|
|
885
873
|
this call throws an exception with `RESOURCE_DOES_NOT_EXIST`.
|
|
886
874
|
|
|
887
875
|
When calling list on a large directory, the list operation will time out after approximately 60
|
|
@@ -909,9 +897,7 @@ class DbfsAPI:
|
|
|
909
897
|
return parsed if parsed is not None else []
|
|
910
898
|
|
|
911
899
|
def mkdirs(self, path: str):
|
|
912
|
-
"""
|
|
913
|
-
|
|
914
|
-
Creates the given directory and necessary parent directories if they do not exist. If a file (not a
|
|
900
|
+
"""Creates the given directory and necessary parent directories if they do not exist. If a file (not a
|
|
915
901
|
directory) exists at any prefix of the input path, this call throws an exception with
|
|
916
902
|
`RESOURCE_ALREADY_EXISTS`. **Note**: If this operation fails, it might have succeeded in creating some
|
|
917
903
|
of the necessary parent directories.
|
|
@@ -932,9 +918,7 @@ class DbfsAPI:
|
|
|
932
918
|
self._api.do("POST", "/api/2.0/dbfs/mkdirs", body=body, headers=headers)
|
|
933
919
|
|
|
934
920
|
def move(self, source_path: str, destination_path: str):
|
|
935
|
-
"""
|
|
936
|
-
|
|
937
|
-
Moves a file from one location to another location within DBFS. If the source file does not exist,
|
|
921
|
+
"""Moves a file from one location to another location within DBFS. If the source file does not exist,
|
|
938
922
|
this call throws an exception with `RESOURCE_DOES_NOT_EXIST`. If a file already exists in the
|
|
939
923
|
destination path, this call throws an exception with `RESOURCE_ALREADY_EXISTS`. If the given source
|
|
940
924
|
path is a directory, this call always recursively moves all files.
|
|
@@ -959,9 +943,7 @@ class DbfsAPI:
|
|
|
959
943
|
self._api.do("POST", "/api/2.0/dbfs/move", body=body, headers=headers)
|
|
960
944
|
|
|
961
945
|
def put(self, path: str, *, contents: Optional[str] = None, overwrite: Optional[bool] = None):
|
|
962
|
-
"""
|
|
963
|
-
|
|
964
|
-
Uploads a file through the use of multipart form post. It is mainly used for streaming uploads, but
|
|
946
|
+
"""Uploads a file through the use of multipart form post. It is mainly used for streaming uploads, but
|
|
965
947
|
can also be used as a convenient single call for data upload.
|
|
966
948
|
|
|
967
949
|
Alternatively you can pass contents as base64 string.
|
|
@@ -996,9 +978,7 @@ class DbfsAPI:
|
|
|
996
978
|
self._api.do("POST", "/api/2.0/dbfs/put", body=body, headers=headers)
|
|
997
979
|
|
|
998
980
|
def read(self, path: str, *, length: Optional[int] = None, offset: Optional[int] = None) -> ReadResponse:
|
|
999
|
-
"""
|
|
1000
|
-
|
|
1001
|
-
Returns the contents of a file. If the file does not exist, this call throws an exception with
|
|
981
|
+
"""Returns the contents of a file. If the file does not exist, this call throws an exception with
|
|
1002
982
|
`RESOURCE_DOES_NOT_EXIST`. If the path is a directory, the read length is negative, or if the offset
|
|
1003
983
|
is negative, this call throws an exception with `INVALID_PARAMETER_VALUE`. If the read length exceeds
|
|
1004
984
|
1 MB, this call throws an exception with `MAX_READ_SIZE_EXCEEDED`.
|
|
@@ -1057,9 +1037,7 @@ class FilesAPI:
|
|
|
1057
1037
|
self._api = api_client
|
|
1058
1038
|
|
|
1059
1039
|
def create_directory(self, directory_path: str):
|
|
1060
|
-
"""
|
|
1061
|
-
|
|
1062
|
-
Creates an empty directory. If necessary, also creates any parent directories of the new, empty
|
|
1040
|
+
"""Creates an empty directory. If necessary, also creates any parent directories of the new, empty
|
|
1063
1041
|
directory (like the shell command `mkdir -p`). If called on an existing directory, returns a success
|
|
1064
1042
|
response; this method is idempotent (it will succeed if the directory already exists).
|
|
1065
1043
|
|
|
@@ -1076,9 +1054,7 @@ class FilesAPI:
|
|
|
1076
1054
|
)
|
|
1077
1055
|
|
|
1078
1056
|
def delete(self, file_path: str):
|
|
1079
|
-
"""
|
|
1080
|
-
|
|
1081
|
-
Deletes a file. If the request is successful, there is no response body.
|
|
1057
|
+
"""Deletes a file. If the request is successful, there is no response body.
|
|
1082
1058
|
|
|
1083
1059
|
:param file_path: str
|
|
1084
1060
|
The absolute path of the file.
|
|
@@ -1091,9 +1067,7 @@ class FilesAPI:
|
|
|
1091
1067
|
self._api.do("DELETE", f"/api/2.0/fs/files{_escape_multi_segment_path_parameter(file_path)}", headers=headers)
|
|
1092
1068
|
|
|
1093
1069
|
def delete_directory(self, directory_path: str):
|
|
1094
|
-
"""
|
|
1095
|
-
|
|
1096
|
-
Deletes an empty directory.
|
|
1070
|
+
"""Deletes an empty directory.
|
|
1097
1071
|
|
|
1098
1072
|
To delete a non-empty directory, first delete all of its contents. This can be done by listing the
|
|
1099
1073
|
directory contents and deleting each file and subdirectory recursively.
|
|
@@ -1111,9 +1085,7 @@ class FilesAPI:
|
|
|
1111
1085
|
)
|
|
1112
1086
|
|
|
1113
1087
|
def download(self, file_path: str) -> DownloadResponse:
|
|
1114
|
-
"""
|
|
1115
|
-
|
|
1116
|
-
Downloads a file. The file contents are the response body. This is a standard HTTP file download, not
|
|
1088
|
+
"""Downloads a file. The file contents are the response body. This is a standard HTTP file download, not
|
|
1117
1089
|
a JSON RPC. It supports the Range and If-Unmodified-Since HTTP headers.
|
|
1118
1090
|
|
|
1119
1091
|
:param file_path: str
|
|
@@ -1140,9 +1112,7 @@ class FilesAPI:
|
|
|
1140
1112
|
return DownloadResponse.from_dict(res)
|
|
1141
1113
|
|
|
1142
1114
|
def get_directory_metadata(self, directory_path: str):
|
|
1143
|
-
"""Get directory metadata.
|
|
1144
|
-
|
|
1145
|
-
Get the metadata of a directory. The response HTTP headers contain the metadata. There is no response
|
|
1115
|
+
"""Get the metadata of a directory. The response HTTP headers contain the metadata. There is no response
|
|
1146
1116
|
body.
|
|
1147
1117
|
|
|
1148
1118
|
This method is useful to check if a directory exists and the caller has access to it.
|
|
@@ -1163,9 +1133,7 @@ class FilesAPI:
|
|
|
1163
1133
|
)
|
|
1164
1134
|
|
|
1165
1135
|
def get_metadata(self, file_path: str) -> GetMetadataResponse:
|
|
1166
|
-
"""Get file metadata.
|
|
1167
|
-
|
|
1168
|
-
Get the metadata of a file. The response HTTP headers contain the metadata. There is no response body.
|
|
1136
|
+
"""Get the metadata of a file. The response HTTP headers contain the metadata. There is no response body.
|
|
1169
1137
|
|
|
1170
1138
|
:param file_path: str
|
|
1171
1139
|
The absolute path of the file.
|
|
@@ -1190,9 +1158,7 @@ class FilesAPI:
|
|
|
1190
1158
|
def list_directory_contents(
|
|
1191
1159
|
self, directory_path: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
|
|
1192
1160
|
) -> Iterator[DirectoryEntry]:
|
|
1193
|
-
"""
|
|
1194
|
-
|
|
1195
|
-
Returns the contents of a directory. If there is no directory at the specified path, the API returns a
|
|
1161
|
+
"""Returns the contents of a directory. If there is no directory at the specified path, the API returns a
|
|
1196
1162
|
HTTP 404 error.
|
|
1197
1163
|
|
|
1198
1164
|
:param directory_path: str
|
|
@@ -1242,9 +1208,7 @@ class FilesAPI:
|
|
|
1242
1208
|
query["page_token"] = json["next_page_token"]
|
|
1243
1209
|
|
|
1244
1210
|
def upload(self, file_path: str, contents: BinaryIO, *, overwrite: Optional[bool] = None):
|
|
1245
|
-
"""
|
|
1246
|
-
|
|
1247
|
-
Uploads a file of up to 5 GiB. The file contents should be sent as the request body as raw bytes (an
|
|
1211
|
+
"""Uploads a file of up to 5 GiB. The file contents should be sent as the request body as raw bytes (an
|
|
1248
1212
|
octet stream); do not encode or otherwise modify the bytes before sending. The contents of the
|
|
1249
1213
|
resulting file will be exactly the bytes sent in the request body. If the request is successful, there
|
|
1250
1214
|
is no response body.
|