API Reference¶
Rust API (docs.rs)¶
All public Rust APIs are documented with cargo doc and published to docs.rs.
Crate |
docs.rs |
Description |
|---|---|---|
|
Application layer, builder, runner |
|
|
DTOs, identifiers, status FSM, config |
|
|
Core traits: Broker, Orchestrator, StateBackend |
|
|
|
|
|
In-memory backend implementations |
|
|
SQLite backend implementations |
|
|
Redis backend implementations |
|
|
MongoDB backend implementations |
|
|
RabbitMQ broker |
|
|
PostgreSQL trigger store |
|
|
Prometheus EventEmitter |
|
|
Web dashboard |
|
|
CLI binary |
|
|
Backend compliance tests |
To generate the full API docs locally:
cargo doc --workspace --no-deps --open
PyO3-Exposed Methods¶
The rustvello-python crate exposes Rust APIs to Python via PyO3.
The methods below are the operational surface used by the pynenc adapters.
Composite Methods (Rustvello App)¶
These methods execute multi-step orchestration flows in Rust (single FFI boundary) and are used by pynenc’s native orchestrator path.
Method |
Description |
|---|---|
|
Status transition + history + trigger + waiter side-effects |
|
Batch registration + broker routing + history |
|
Persist result + success transition + downstream updates |
|
Persist error + failure/retry transition |
|
Retry transition + re-enqueue |
|
Pull runnable invocations for execution |
|
Task submission in one call |
|
Requeue invocations for execution |
|
Evaluate all trigger conditions |
|
Heartbeats + recovery + trigger window checks |
Query Methods¶
Methods exposed for querying invocation and runner state:
Method |
Description |
|---|---|
|
Get current status record |
|
Query invocations by status |
|
Query invocations by status with optional task filter |
|
Query invocations by task |
|
Query invocations by call ID |
|
Count invocations matching filters |
|
Paginated invocation listing |
|
Existing invocation lookup for CC |
|
Fetch invocations currently blocked on dependencies |
|
Filter a set of invocation IDs by status |
Lifecycle Methods¶
Method |
Description |
|---|---|
|
Initialize Rust logging subscriber from Python |
|
List active runners from heartbeat data |
|
List stale pending invocations |
|
List stale running invocations |
|
Persist atomic service execution windows |
|
Purge finalized invocations past retention window |
|
Publish runner heartbeat |
Exception Classes¶
PyO3-exposed exceptions that map from RustvelloError variants:
Python Exception |
Rust Variant |
Raised When |
|---|---|---|
|
|
Task explicitly requests retry |
|
|
Concurrency policy triggers retry |
|
|
Invocation ID does not exist in the backend |
|
|
Status transition violates FSM rules |
|
|
Runner ownership rules are violated |
|
|
Optimistic status update raced |
|
|
JSON serialization/deserialization failed |
|
|
Task ID does not exist |
|
|
Task exists but not registered in this app |
|
|
Configuration parsing or validation failed |
|
|
Infrastructure/backend error (non-runner kind) |
|
|
Task callback or runner-side failure |
|
|
Internal engine error |
Exceptions in the rustvello module inherit from RustvelloError.
In pynenc-facing adapters, status exceptions are translated to pynenc
exceptions (InvocationStatusTransitionError, InvocationStatusOwnershipError) with
structured fields preserved.
Python API (pynenc)¶
See also: Pynenc Docs
Python users interact with Pynenc functions and decorators, not these PyO3 boundaries directly. See the Pynenc API Reference for public interfaces available to Python apps.
Python users interact with rustvello through pynenc.
The py-rustvello wheel provides thin PyO3 wrappers but the user-facing Python
API lives in pynenc.
pynenc Python API — decorators, builder, configuration
py-rustvello on PyPI — Python wheel
crates.io¶
Crate |
Link |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|