Each invocation has its own unique ID and lifecycle.
See managing invocations to learn how to manage the lifecycle of an invocation.
Always invoke handlers via the context when you have access to it.
Restate then links the invocation to its parent invocation.
Prerequisites
Install the Python SDK, which includes the client:restate, timedelta from datetime, and your handler definitions into the application that creates the client.
Request response invocations
To invoke a handler and wait for its response:restate.create_client as an async context manager so the underlying HTTP client closes after use.
One way invocations
To send a message without waiting for a response:Delayed invocations
To schedule an invocation for a later point in time:Invoke a handler idempotently
Add an idempotency key to prevent retries of the same request from executing the handler more than once:headers argument.
See service configuration to configure the idempotency retention period.
Flow control: scope and limit key
Scope and limit key are a preview feature and require Restate Server 1.7 with flow control enabled.
client.scope(...), then pass a limit_key for a more specific concurrency limit within that scope: