Environments
Saved sizes (CPU, memory, storage, GPU), with optional container images.
Access it as client.environments on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.
Quick start
from strongly import Strongly
client = Strongly()
# List (auto-paginates as you iterate) # filters: enabled_only, include_usage
for environment in client.environments.list():
print(environment.id)
Methods
Core
list
list(*, enabled_only: bool | None = None, include_usage: bool | None = None) -> SyncPaginator[Environment]
List the environments you may use.
The platform's, your organization's and those shared with you.
Parameters
enabled_only(bool | None, optional): Only enabled environments.include_usage(bool | None, optional): Add each one'susage_countandin_use.
create
create(*, name: str, description: str | None = None, cpu: float | None = None, memory_gb: float | None = None, storage_gb: float | None = None, gpu_count: int | None = None, gpu_type: str | None = None, is_public: bool | None = None, base_image: str | None = None, dockerfile: str | None = None) -> Environment
Create an environment.
With base_image or dockerfile, its image builds as version 1: poll
retrieve until build_status is success. An environment for a
workflow builds FROM the platform's workflow-worker image.
Parameters
name(str): Unique within your organization.cpu, memory_gb, storage_gb(float | None, optional): Its size (defaults 1 core, 4 GB memory, 20 GB storage).gpu_count, gpu_type(optional): GPUs and their type (for examplenvidia-t4).is_public(bool | None, optional): Every user may use it.base_image, dockerfile(str | None, optional): The image to build from, and instructions to add after it.
retrieve
retrieve(environment_id: str) -> Environment
Get an environment, with its build state and versions.
update
update(environment_id: str, *, name: str | None = None, description: str | None = None, cpu: float | None = None, memory_gb: float | None = None, storage_gb: float | None = None, gpu_count: int | None = None, gpu_type: str | None = None, is_public: bool | None = None, base_image: str | None = None, dockerfile: str | None = None, enabled: bool | None = None) -> Environment
Change an environment.
A new base_image or dockerfile builds a new version; its size cannot change
while something uses it.
delete
delete(environment_id: str) -> None
Delete an environment and its images. One that something still uses is refused.
Other
base_image_status
base_image_status() -> BaseImageStatuses
Whether each environment's image is built from what its base image tag points to now.
rebuild
rebuild(environment_id: str) -> EnvironmentRebuild
Build an environment again, as a new version, from its base tag's present digest.
The versions in use keep running until the build succeeds.