dataerai transfer daemon. Its methods are blocking, so they’re easy to use in a script or a Jupyter notebook. The daemon starts automatically if it isn’t already running.
Requirements
- Python 3.10+
- The
dataeraibinary on yourPATH(see the CLI overview), or passbinary_pathexplicitly. - Signed in with
dataerai auth login(see Authenticate).
Install
Quickstart
with ... as client:) for automatic cleanup, or call client.connect() and client.close() yourself.
Methods
| Method | Returns | Description |
|---|---|---|
auth_status() | AuthStatus | Logged-in user and token expiry. |
upload(local_path, *, title, owner_type, owner_id, ...) | UploadResult | Upload a file; blocks until complete. |
download(asset_id, dest_dir, ...) | DownloadResult | Download the latest content; blocks until complete. Resumes automatically. |
get_metadata(asset_id) | AssetMetadata | Retrieve metadata. |
set_metadata(asset_id, **fields) | AssetMetadata | Update metadata fields. |
upload() arguments
title, owner_type ("project" or "collection"), and owner_id are required. Optional: description, alias, tags, metadata (dict), collection_id, chunk_size_mb, on_progress (callback), and transfer_timeout_s (default 3600).
The on_progress callback receives a ProgressEvent with bytes_done, bytes_total, file_name, and convenience percent and rate_mbps properties.
Errors
| Exception | When |
|---|---|
DaemonError(code, message) | The daemon returned a coded error. |
DaemonTimeoutError | A request or transfer exceeded its timeout. |
ConnectionError | The daemon disconnected unexpectedly. |
Next steps
CLI
The command-line client the SDK builds on.
Node SDK
The same operations from Node.js.