Skip to content

Stack

A Python-exposed wrapper for a stack version.

This class is just the base class of all published stacks in your platform and is not intended to be used directly. This allows interaction with a specific version of a stack from the configured cloud provider via the Python SDK. The name of the stack is the logical name of the stack (e.g., "WebsiteRunner").

Example

from infraweave import WebsiteRunner

website_stack = WebsiteRunner(
    version='0.1.6',
    track="stable"
)

Properties

name

Gets the stack name.

track

Gets the stack track.

version

Gets the stack version.

Methods

__new__(args, kwargs)

Create and return a new object. See help(type) for accurate signature.

get_latest_version(track)

Gets the latest version of this stack for a given track.

Fetches the most recent version of the stack from the configured cloud provider. If no track is specified, defaults to "stable".

Arguments

  • track - Optional release track (e.g., "stable", "beta", "dev"). Defaults to "stable" if not provided.

Returns

A new Stack instance with the latest version for the specified track.

Errors

Panics if the stack is not found or if there's an error communicating with the cloud provider.

Example

from infraweave import WebsiteRunner

# Get latest stable version
latest_stack = WebsiteRunner.get_latest_version()

# Get latest dev version
latest_dev = WebsiteRunner.get_latest_version(track="dev")

get_latest_version_by_name(name, track)

Static method to get the latest version by stack name.

This is used internally by dynamic wrapper classes.