Skip to main content
The ExecutionsResource on the Figranium Python SDK gives you full visibility and control over every task run. Use it to list past executions, inspect a single run, clean up history, stop active runs, and subscribe to a live Server-Sent Events stream of execution updates.

Methods

Returns a list of executions. By default it calls GET /api/executions/list, which is the route intended for API-key access. If you pass api_key_route=False, the SDK switches to GET /api/executions instead.
Most callers should leave api_key_route at its default (True). Only override it when your deployment requires the alternate route.
Fetches a single execution by its ID. Calls GET /api/executions/{id}.
Removes a single execution record. Calls DELETE /api/executions/{id}.
Deletes all executions in bulk. Calls POST /api/executions/clear.
Sends a stop signal to an active run. Calls POST /api/executions/stop.
Opens a Server-Sent Events connection to GET /api/executions/stream and yields each event as it arrives. The iterator stays open until the server closes the stream, the client stops iterating, or the request is aborted.For details on the StreamEvent shape and how cancellation works, see Streaming. For error handling, see Errors.
On AsyncFigranium, stream returns an AsyncIterator[StreamEvent] and you iterate with async for.

End-to-end example

This example lists recent executions, inspects the newest one, and stops it if it is still running.