Platform API¶
This package (deeporigin
) wraps a lower-level autogenerated client library to interact with the platform API.
The following modules are available to interact with various APIs on the platform:
platform.entities_api
¶
API to interact with the tools API. To list available methods in this module, use:
from deeporigin.platform import entities_api
entities_api.__all__
platform.file_api
¶
API to interact with the tools API. To list available methods in this module, use:
from deeporigin.platform import file_api
file_api.__all__
bridge module to interact with the platform files api
Attributes¶
Functions¶
download_file
¶
download_file(
*,
remote_path: str,
local_path: Optional[str] = None,
client=None
)
download a single file from UFA to ~/.deeporigin/, or some other local path
Parameters:
Name | Type | Description | Default |
---|---|---|---|
remote_path
|
str
|
The remote path of the file to download. |
required |
local_path
|
str
|
The local path to save the file to. If None, uses ~/.deeporigin/. |
None
|
download_files
¶
download_files(
files: dict[str, str | None], *, client=None
)
Download multiple files in parallel. files: {remote_path: local_path or None}. If local_path is None, use default. Raises RuntimeError if any download fails.
upload_file
¶
upload_file(
*, local_path: str, remote_path: str, client=None
)
upload a single file to UFA
Parameters:
Name | Type | Description | Default |
---|---|---|---|
local_path
|
str
|
The local path of the file to upload. |
required |
remote_path
|
str
|
The remote path of the file to upload. |
required |
upload_files
¶
upload_files(files: dict[str, str], *, client=None)
Upload multiple files in parallel. files: {local_path: remote_path}. Raises RuntimeError if any upload fails.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
files
|
dict[str, str]
|
A dictionary of local paths to remote paths. |
required |