Skip to main content
A sail.App is the application that owns your sailboxes. Every Sailbox.create call needs an App, usually resolved by name with App.find().
import sail

app = sail.App.find(name="example-app", mint_if_missing=True)
print(app.id, app.name)

App.find

@classmethod
def find(*, name: str, mint_if_missing: bool = False) -> App
Finds an app by name, optionally creating it if it does not exist.
ParameterDefaultDescription
namerequiredThe app name to look up.
mint_if_missingFalseCreate the app if no app with that name exists.
Returns the App. Raises LookupError if the app is not found and mint_if_missing is False, PermissionError on auth failures, RuntimeError on other errors.

App.list

@classmethod
def list() -> list[AppOverview]
Returns one AppOverview rollup row per app the current org owns. The response is not paginated (the per-org app count is small). Apps with no recent observed-usage sample report zero usage rather than failing the call.

Attributes

AttributeTypeDescription
idstrStable app identifier.
namestrApp name.
created_atintCreation timestamp.

AppOverview

A per-app rollup of sailbox lifecycle counts and resource usage, returned by App.list. Lifecycle counts and configured resource-control maxima come from the control plane; observed usage is the latest live sample within roughly the last two minutes, falling back to zero when no recent sample is available.
FieldTypeDescription
app_id / app_namestrApp identity.
sailbox_countintTotal sailboxes for the app.
running_countintSailboxes currently running.
paused_countintSailboxes paused.
sleeping_countintSailboxes sleeping.
failed_countintSailboxes in a failed state.
cpu_requested_vcpuintTotal configured vCPU maximum.
cpu_used_vcpufloatLatest observed vCPU usage.
memory_requested_bytes / memory_used_bytesintConfigured max vs observed memory.
disk_requested_bytes / disk_used_bytesintConfigured max vs observed disk.