kaskada.api.release

Module Contents

Classes

LocalRelease

Configuration details for a local release. Mostly used for binary paths.

ReleaseClient

Attributes

logger

logger[source]
class LocalRelease(download_path, manager_path, engine_path)[source]

Bases: object

Configuration details for a local release. Mostly used for binary paths.

Parameters:
class ReleaseClient[source]

Bases: object

ORGANIZATION = 'kaskada-ai'[source]
REPO_NAME = 'kaskada'[source]
GITHUB_ACCESS_TOKEN_ENV = 'GITHUB_ACCESS_TOKEN'[source]
ASSETS_API_ENDPOINT[source]
download_release(download_path, manager_bin_name, engine_bin_name, engine_version='engine@v0.11.0')[source]

Downloads the appropriate version of the kaskada-manager and kaskada-engine services.

Parameters:
  • download_path (Path) – The local download path

  • manager_bin_name (str) – The name of the manager binary to save in download path

  • engine_bin_name (str) – The name of the engine binary to save in download path

  • engine_version (Optional[str]) – The engine version to download, e.g., engine@v<semantic-version>. Defaults to engine@v0.11.0

Raises:

RuntimeError – unable to get release assets

Returns:

manager path and engine path

Return type:

Tuple[str, str]

__download(r, url, download_path, description, file_size=0)[source]

Downloads a URL as an application/octet-stream

Parameters:
  • r (requests.Session) – The request session

  • url (str) – The target URL

  • download_path (Path) – The local path to stream write the file

  • description (str) – The description to render during download

  • file_size (int, optional) – The file size if known ahead of time. Defaults to response content size or 0.

Raises:

RuntimeError – Unable to download the target URL due to non 200 error code.

Returns:

The local download path

Return type:

Path