API Reference

exasol.nb_connector

exasol.nb_connector.github.retrieve_jar(project: Project, use_local_cache: bool = True, storage_path: Path | None = None) Path[source]

Returns latest jar file for the project, possibly using local cache.

Parameters:
  • project – project to be used

  • use_local_cache – should local cache be used or file always retrieved anew

  • storage_path – path to be used for downloading. If None, current directory will be used.

Returns:

path to the jar file on the local filesystem

class exasol.nb_connector.ai_lab_config.AILabConfig(value)[source]

An enumeration.

accelerator = 42
aws_access_key_id = 25
aws_region = 24
aws_secret_access_key = 26
bfs_bucket = 17
bfs_connection_name = 44
bfs_encryption = 20
bfs_host_name = 12
bfs_internal_host_name = 14
bfs_internal_port = 15
bfs_model_subdir = 43
bfs_password = 19
bfs_port = 13
bfs_service = 16
bfs_user = 18
cert_vld = 8
client_cert = 10
client_key = 11
db_encryption = 7
db_host_name = 2
db_password = 6
db_port = 3
db_schema = 4
db_user = 5
disk_size = 22
huggingface_token = 23
itde_container = 27
itde_network = 29
itde_volume = 28
mem_size = 21
saas_account_id = 38
saas_database_id = 39
saas_database_name = 40
saas_token = 37
saas_url = 36
sme_aws_bucket = 33
sme_aws_connection = 35
sme_aws_role = 34
storage_backend = 41
te_hf_connection = 30
te_models_cache_dir = 31
trusted_ca = 9
txaie_models_cache_dir = 32
use_itde = 1
class exasol.nb_connector.ai_lab_config.Accelerator(value)[source]

An enumeration.

none = 'none'
nvidia = 'nvidia'
class exasol.nb_connector.ai_lab_config.StorageBackend(value)[source]

An enumeration.

onprem = 1
saas = 2

exasol.nb_connector.connections

exasol.nb_connector.itde_manager

class exasol.nb_connector.itde_manager.ItdeContainerStatus(value)[source]

An enumeration.

ABSENT = 0
READY = 7
RUNNING = 3
STOPPED = 1
VISIBLE = 5
exasol.nb_connector.itde_manager.bring_itde_up(conf: Secrets, env_info: EnvironmentInfo | None = None) None[source]

Launches the ITDE environment using its API. Sets hardcoded environment name, and Google name server address. Additionally, can set the following parameters with values collected from the secret store: - database port forwarding, - BucketFS port forwarding, - database memory size (the value is assumed to be the number of gigabytes), - database disk size (the value is assumed to be the number of gigabytes).

Optionally, an existing instance of the DockerDB can be used instead. In this case the EnvironmentInfo object must be provided.

The function connects the current container to the network of the container where the Docker DB is running.

The names of created docker container, docker volume and docker network will be saved in the provided secret store. They will be used by the function that takes down the environment.

The function saves the main AI-Lab configuration parameters, such as the DB and BucketFS connection parameters, in the secret store.

exasol.nb_connector.itde_manager.get_itde_status(conf: Secrets) ItdeContainerStatus[source]

Checks if the ITDE container exists and ready to be used. In the Docker Edition that means the ITDE is running and the AI-Lab container is connected to its network. In other editions it will just check that the ITDE is running.

Returns the container status.

The name of the container is taken from the provided secret store. If the name cannot be found there the function returns the status ABSENT.

exasol.nb_connector.itde_manager.restart_itde(conf: Secrets) None[source]

Starts an existing ITDE container if it’s not already running. In the Docker Edition connects the AI-Lab container to the Docker-DB network, unless it’s already connected to it.

For this function to work the container must exist. If it doesn’t a RuntimeError will be raised. Use the get_itde_status function to check if the container exists.

exasol.nb_connector.itde_manager.take_itde_down(conf: Secrets, stop_db: bool = True) None[source]

Shuts down the ITDE. The names of the docker container, docker volume and docker network are taken from the provided secret store. If the names are not found there no action is taken.

Stopping the DockerDB can be skipped by setting the stop_db parameter to False. This is a useful option in case the DockerDB has been provided externally.

exasol.nb_connector.script_language_container

Functions and Classes in Other Packages

exasol.nb_connector.secret_store.Secrets(db_file: Path, master_password: str) None[source]

Looks for a specified file starting from the current directory upward the file hierarchy. Hence, the last place to find the file is the root.

Returns the full path of the file if found. Otherwise, raises a ValueError exception.