src.asqi.backends¶
Submodules¶
Functions¶
|
Create the appropriate ContainerBackend based on the |
Package Contents¶
- src.asqi.backends.create_backend(backend: str | None = None, namespace: str | None = None) asqi.backends.base.ContainerBackend¶
Create the appropriate ContainerBackend based on the
RUN_BACKENDenv var.Reads the provided backend value or
RUN_BACKENDenvironment variable (case-insensitive, default:docker) and constructs the matching backend:docker→DockerBackendk8s→KubernetesBackend(namespace taken from the provided namespace orK8S_NAMESPACE, default:"default"; requirespip install 'asqi-engineer[k8s]')
- Raises:
ValueError: If the resolved backend value is not one of
dockerork8s. ImportError: Ifk8sis selected but thekubernetespackage is not installed.- Returns:
A
ContainerBackendinstance.