Skip to content

Types

The type aliases the signatures of the client and the framework share.

Type aliases shared by the client and the framework.

Command module-attribute

Command = str | Sequence[str]

A command: a string runs through sh -c, a sequence is the argument list.

VersionPolicy module-attribute

VersionPolicy = Literal['strict', 'warn', 'ignore']

What to do when the daemon reports an API version this release was not audited on: refuse (strict), log a warning, or ignore it.

Lifespan module-attribute

Lifespan = Callable[['FastSandbox'], contextlib.AbstractAsyncContextManager[Mapping[str, Any] | None]]

An async context manager factory run around the life of the application; what it yields becomes Context.state.

ProgressHandler module-attribute

ProgressHandler = Callable[[float, float | None, str | None], Awaitable[None] | None]

Receives (progress, total, message) from Context.report_progress.