The page you navigated to () does not exist, so we brought you to the closest page to it.
You have switched from the to the variant of this site. There is no equivalent of . We have taken you to the closest page in the variant.
2.1.5
Environment
Package: flyte
Parameters
class Environment(
name: str,
depends_on: List[Environment],
pod_template: Optional[Union[str, PodTemplate]],
description: Optional[str],
secrets: Optional[SecretRequest],
env_vars: Optional[Dict[str, str]],
resources: Optional[Resources],
interruptible: bool,
image: Union[str, Image, Literal['auto'], None],
)| Parameter | Type | Description |
|---|---|---|
name |
str |
Name of the environment |
depends_on |
List[Environment] |
Environment dependencies to hint, so when you deploy the environment, the dependencies are also deployed. This is useful when you have a set of environments that depend on each other. |
pod_template |
Optional[Union[str, PodTemplate]] |
Pod template to use for the environment. |
description |
Optional[str] |
Description of the environment. |
secrets |
Optional[SecretRequest] |
Secrets to inject into the environment. |
env_vars |
Optional[Dict[str, str]] |
Environment variables to set for the environment. |
resources |
Optional[Resources] |
Resources to allocate for the environment. |
interruptible |
bool |
Whether the environment is interruptible and can be scheduled on spot/preemptible instances |
image |
Union[str, Image, Literal['auto'], None] |
Docker image to use for the environment. If set to “auto”, will use the default image. |
Methods
| Method | Description |
|---|---|
add_dependency() |
Add a dependency to the environment. |
clone_with() |
add_dependency()
def add_dependency(
env: Environment,
)Add a dependency to the environment.
| Parameter | Type | Description |
|---|---|---|
env |
Environment |
clone_with()
def clone_with(
name: str,
image: Optional[Union[str, Image, Literal['auto']]],
resources: Optional[Resources],
env_vars: Optional[Dict[str, str]],
secrets: Optional[SecretRequest],
depends_on: Optional[List[Environment]],
description: Optional[str],
kwargs: **kwargs,
) -> Environment| Parameter | Type | Description |
|---|---|---|
name |
str |
|
image |
Optional[Union[str, Image, Literal['auto']]] |
|
resources |
Optional[Resources] |
|
env_vars |
Optional[Dict[str, str]] |
|
secrets |
Optional[SecretRequest] |
|
depends_on |
Optional[List[Environment]] |
|
description |
Optional[str] |
|
kwargs |
**kwargs |