kaskada.api.session
Module Contents
Classes
An extension of a kaskada.api.Session that is executed locally. The local session is kept alive by using the LocalSessionKeepAlive. |
|
Helper class that provides a standard way to create an ABC using |
|
Helper class that provides a standard way to create an ABC using |
Attributes
- class Session(endpoint, is_secure, client_id=None, client_factory=None)[source]
- Parameters:
endpoint (str) –
is_secure (bool) –
client_id (Optional[str]) –
client_factory (Optional[kaskada.client.ClientFactory]) –
- class LocalSession(endpoint, is_secure, manager_service, engine_service, client_id=None, should_keep_alive=True)[source]
Bases:
Session
An extension of a kaskada.api.Session that is executed locally. The local session is kept alive by using the LocalSessionKeepAlive.
- Parameters:
endpoint (str) –
is_secure (bool) –
manager_service (kaskada.api.local_session.local_service.KaskadaLocalService) –
engine_service (kaskada.api.local_session.local_service.KaskadaLocalService) –
client_id (Optional[str]) –
should_keep_alive (bool) –
- keep_alive_watcher: Optional[kaskada.api.local_session.local_session_keep_alive.LocalSessionKeepAlive][source]
- KASKADA_SESSION: Optional[LocalSession][source]
- class Builder(endpoint=None, is_secure=None, name=None, client_id=None)[source]
Bases:
abc.ABC
Helper class that provides a standard way to create an ABC using inheritance.
- Parameters:
- class LocalBuilder(endpoint=kaskada.client.KASKADA_DEFAULT_ENDPOINT, is_secure=kaskada.client.KASKADA_IS_SECURE, engine_version='engine@v0.11.0')[source]
Bases:
Builder
Helper class that provides a standard way to create an ABC using inheritance.
- with_manager_args(configs)[source]
Configure the Manager to run with a list of arguments. The arguments must be prefixed with a “-” and boolean values are represented as “1” or “0”.
For example: ``` from kaskada.api.session import LocalBuilder
- session = LocalBuilder().with_manager_configs([
(“-object-store-type”, “local”), (“-object-store-path”, “/Users/kevin.nguyen/Github/kaskada/examples3”), (“-db-in-memory”, “1”), (“-rest-port”, 12345)
]).build()
- Parameters:
configs (List[Tuple[str, Any]]) – Manager arguments
- engine_version(version)[source]
Set a specific version of the engine to download. The version must be in the format engine@v<semantic-version>.
- Parameters:
version (str) – The git tag for a release on the kaskada repo
- Raises:
ValueError – When an invalid version if provided. Note this does not check to the version’s existence on Github.
- Returns:
Updated instance of LocalBuilder with the engine version set.
- Return type:
- __get_std_paths(service_name)[source]
- Parameters:
service_name (str) –
- Return type:
Tuple[pathlib.Path, pathlib.Path]
- __download_release(engine_version=None)[source]
Downloads a kaskada release version to the binary path.
- Parameters:
engine_version (Optional[str]) – The engine version to download, e.g., engine@v<semantic-version>. Defaults to None for latest release.