class Resonate:
Constructors: Resonate.local(dependencies, group, log_level, pid, ...)
, Resonate.remote(auth, dependencies, group, host, ...)
, Resonate(dependencies, group, log_level, message_source, ...)
Undocumented
Class Method | local |
Create a local Resonate client. |
Class Method | remote |
Create a remote Resonate client. |
Method | __init__ |
Create a Resonate client. |
Method | get |
Subscribe to an execution. |
Method | options |
Undocumented |
Method | register |
Register function with Resonate. |
Method | rpc |
Run a function with Resonate remotely. |
Method | run |
Run a function with Resonate. |
Method | set |
Store a named dependency for use with Context . |
Method | start |
Undocumented |
Method | stop |
Undocumented |
Property | promises |
Undocumented |
Property | schedules |
Undocumented |
Instance Variable | _bridge |
Undocumented |
Instance Variable | _dependencies |
Undocumented |
Instance Variable | _group |
Undocumented |
Instance Variable | _log |
Undocumented |
Instance Variable | _message |
Undocumented |
Instance Variable | _opts |
Undocumented |
Instance Variable | _pid |
Undocumented |
Instance Variable | _registry |
Undocumented |
Instance Variable | _started |
Undocumented |
Instance Variable | _store |
Undocumented |
Instance Variable | _ttl |
Undocumented |
Dependencies | None
= None, group: str
= 'default', log_level: int | Literal[ 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
= logging.INFO, pid: str | None
= None, registry: Registry | None
= None, ttl: int
= 10) -> Resonate
:
¶
Create a local Resonate client.
This configuration stores all state in memory, with no external persistence or network I/O. The in memory store implements the same API as the remote store, making it perfect for rapid development, local testing, and experimentation.
tuple[ str, str] | None
= None, dependencies: Dependencies | None
= None, group: str
= 'default', host: str | None
= None, log_level: int | Literal[ 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
= logging.INFO, message_source_port: str | None
= None, pid: str | None
= None, registry: Registry | None
= None, store_port: str | None
= None, ttl: int
= 10) -> Resonate
:
¶
Create a remote Resonate client.
This configuration persists all state to a remote store, enabling full durability, coordination, and recovery protocols across processes.
The remote store implementation is ideal for production workloads, fault-tolerant scheduling, and distributed execution.
Dependencies | None
= None, group: str
= 'default', log_level: int | Literal[ 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
= logging.NOTSET, message_source: MessageSource | None
= None, pid: str | None
= None, registry: Registry | None
= None, store: Store | None
= None, ttl: int
= 10):
¶
Create a Resonate client.
Subscribe to an execution.
A durable promise with the same id must exist. Returns immediately if the promise has been completed.
Encoder[ Any, str | None] | None
= None, idempotency_key: str | Callable[ [ str], str] | None
= None, retry_policy: RetryPolicy | Callable[ [ Callable], RetryPolicy] | None
= None, tags: dict[ str, str] | None
= None, target: str | None
= None, timeout: float | None
= None, version: int | None
= None) -> Resonate
:
¶
Undocumented
Callable[ Concatenate[ Context, P], R]
, /, *, name: str | None
= None, version: int
= 1) -> Function[ P, R]
:str | None
= None, version: int
= 1) -> Callable[ [ Callable[ Concatenate[ Context, P], R]], Function[ P, R]]
:Register function with Resonate.
This method makes the provided function available for top level execution under the specified name and version.
It can be used directly by passing the target function, or as a decorator.
When used without arguments, the function itself is decorated and registered with the default name (derived from the function) and version. Providing a name or version allows explicit control over the function identifier and its versioning for subsequent invocations.
str
, func: Callable[ Concatenate[ Context, P], Generator[ Any, Any, R] | R]
, *args: P.args
, **kwargs: P.kwargs
) -> Handle[ R]
:str
, func: str
, *args: Any
, **kwargs: Any
) -> Handle[ Any]
:Run a function with Resonate remotely.
If a durable promise with the same id already exists, the method will subscribe to its result or return the value immediately if the promise has been completed.
Resonate will prevent duplicate executions for the same id.
- Function must be registered
- Function args and kwargs must be serializable
str
, func: Callable[ Concatenate[ Context, P], Generator[ Any, Any, R] | R]
, *args: P.args
, **kwargs: P.kwargs
) -> Handle[ R]
:str
, func: str
, *args: Any
, **kwargs: Any
) -> Handle[ Any]
:Run a function with Resonate.
If a durable promise with the same id already exists, the method will subscribe to its result or return the value immediately if the promise has been completed.
Resonate will prevent duplicate executions for the same id.
- Function must be registered
- Function args and kwargs must be serializable