databricks-sdk 0.55.0__py3-none-any.whl → 0.57.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.

Files changed (31) hide show
  1. databricks/sdk/__init__.py +41 -24
  2. databricks/sdk/service/aibuilder.py +505 -0
  3. databricks/sdk/service/apps.py +14 -42
  4. databricks/sdk/service/billing.py +167 -220
  5. databricks/sdk/service/catalog.py +462 -1235
  6. databricks/sdk/service/cleanrooms.py +26 -43
  7. databricks/sdk/service/compute.py +75 -211
  8. databricks/sdk/service/dashboards.py +77 -511
  9. databricks/sdk/service/database.py +1271 -0
  10. databricks/sdk/service/files.py +20 -54
  11. databricks/sdk/service/iam.py +61 -171
  12. databricks/sdk/service/jobs.py +453 -68
  13. databricks/sdk/service/marketplace.py +46 -146
  14. databricks/sdk/service/ml.py +453 -477
  15. databricks/sdk/service/oauth2.py +17 -45
  16. databricks/sdk/service/pipelines.py +125 -40
  17. databricks/sdk/service/provisioning.py +30 -93
  18. databricks/sdk/service/qualitymonitorv2.py +265 -0
  19. databricks/sdk/service/serving.py +106 -46
  20. databricks/sdk/service/settings.py +1062 -390
  21. databricks/sdk/service/sharing.py +33 -88
  22. databricks/sdk/service/sql.py +292 -185
  23. databricks/sdk/service/vectorsearch.py +13 -43
  24. databricks/sdk/service/workspace.py +35 -105
  25. databricks/sdk/version.py +1 -1
  26. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/METADATA +1 -1
  27. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/RECORD +31 -28
  28. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/WHEEL +0 -0
  29. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/LICENSE +0 -0
  30. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/licenses/NOTICE +0 -0
  31. {databricks_sdk-0.55.0.dist-info → databricks_sdk-0.57.0.dist-info}/top_level.txt +0 -0
@@ -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
- """Append data block.
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
- """Close the stream.
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
- """Open a stream.
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 a file/directory.
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
- """Get the information of a file or directory.
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 directory contents or file details.
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
- """Create a directory.
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
- """Move a file.
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
- """Upload a file.
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
- """Get the contents of a file.
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`.
@@ -1049,15 +1029,15 @@ class FilesAPI:
1049
1029
  `enable_experimental_files_api_client = True` in your configuration profile or use the environment
1050
1030
  variable `DATABRICKS_ENABLE_EXPERIMENTAL_FILES_API_CLIENT=True`.
1051
1031
 
1032
+ Use of Files API may incur Databricks data transfer charges.
1033
+
1052
1034
  [Unity Catalog volumes]: https://docs.databricks.com/en/connect/unity-catalog/volumes.html"""
1053
1035
 
1054
1036
  def __init__(self, api_client):
1055
1037
  self._api = api_client
1056
1038
 
1057
1039
  def create_directory(self, directory_path: str):
1058
- """Create a directory.
1059
-
1060
- 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
1061
1041
  directory (like the shell command `mkdir -p`). If called on an existing directory, returns a success
1062
1042
  response; this method is idempotent (it will succeed if the directory already exists).
1063
1043
 
@@ -1074,9 +1054,7 @@ class FilesAPI:
1074
1054
  )
1075
1055
 
1076
1056
  def delete(self, file_path: str):
1077
- """Delete a file.
1078
-
1079
- 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.
1080
1058
 
1081
1059
  :param file_path: str
1082
1060
  The absolute path of the file.
@@ -1089,9 +1067,7 @@ class FilesAPI:
1089
1067
  self._api.do("DELETE", f"/api/2.0/fs/files{_escape_multi_segment_path_parameter(file_path)}", headers=headers)
1090
1068
 
1091
1069
  def delete_directory(self, directory_path: str):
1092
- """Delete a directory.
1093
-
1094
- Deletes an empty directory.
1070
+ """Deletes an empty directory.
1095
1071
 
1096
1072
  To delete a non-empty directory, first delete all of its contents. This can be done by listing the
1097
1073
  directory contents and deleting each file and subdirectory recursively.
@@ -1109,9 +1085,7 @@ class FilesAPI:
1109
1085
  )
1110
1086
 
1111
1087
  def download(self, file_path: str) -> DownloadResponse:
1112
- """Download a file.
1113
-
1114
- 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
1115
1089
  a JSON RPC. It supports the Range and If-Unmodified-Since HTTP headers.
1116
1090
 
1117
1091
  :param file_path: str
@@ -1138,9 +1112,7 @@ class FilesAPI:
1138
1112
  return DownloadResponse.from_dict(res)
1139
1113
 
1140
1114
  def get_directory_metadata(self, directory_path: str):
1141
- """Get directory metadata.
1142
-
1143
- 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
1144
1116
  body.
1145
1117
 
1146
1118
  This method is useful to check if a directory exists and the caller has access to it.
@@ -1161,9 +1133,7 @@ class FilesAPI:
1161
1133
  )
1162
1134
 
1163
1135
  def get_metadata(self, file_path: str) -> GetMetadataResponse:
1164
- """Get file metadata.
1165
-
1166
- 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.
1167
1137
 
1168
1138
  :param file_path: str
1169
1139
  The absolute path of the file.
@@ -1188,9 +1158,7 @@ class FilesAPI:
1188
1158
  def list_directory_contents(
1189
1159
  self, directory_path: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
1190
1160
  ) -> Iterator[DirectoryEntry]:
1191
- """List directory contents.
1192
-
1193
- 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
1194
1162
  HTTP 404 error.
1195
1163
 
1196
1164
  :param directory_path: str
@@ -1240,9 +1208,7 @@ class FilesAPI:
1240
1208
  query["page_token"] = json["next_page_token"]
1241
1209
 
1242
1210
  def upload(self, file_path: str, contents: BinaryIO, *, overwrite: Optional[bool] = None):
1243
- """Upload a file.
1244
-
1245
- 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
1246
1212
  octet stream); do not encode or otherwise modify the bytes before sending. The contents of the
1247
1213
  resulting file will be exactly the bytes sent in the request body. If the request is successful, there
1248
1214
  is no response body.