Skip to main content

Vertep

vertep

W3C SCXML statecharts as journaled actors, from Python

PyPI GitHub license

Vertep runs W3C SCXML statecharts as event-sourced actors. This package is the Python binding of the same Rust core that backs the Rust crates and the @vertep/web npm package: one chart, one journal format and one set of semantics in all three.

  • Charts in SCXML, YAML or RDF, validated and content-addressed exactly as in the Rust runtime
  • One journal entry per accepted event, with the transitions it took; time travel with as_of
  • Durable timers, and a journal in a file that the Rust runtime and @vertep/web open as well
  • The state graph queryable with SPARQL
  • Guards and actions written in Python, and the CEL datamodel built in
  • An explicit clock: real time for services, a virtual clock for deterministic tests

Install

pip install vertep

CPython 3.9 or later. Wheels for Linux, macOS and Windows; no Rust toolchain needed.

Use

from vertep import ActorSystem

CART = """<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0"
       datamodel="cel" name="cart" initial="empty">
  <datamodel><data id="items" expr="0"/></datamodel>
  <state id="empty">
    <transition event="add" target="filled"><assign location="items" expr="ctx.items + ev.data.qty"/></transition>
  </state>
  <state id="filled">
    <transition event="add"><assign location="items" expr="ctx.items + ev.data.qty"/></transition>
    <transition event="checkout" cond="ctx.items > 0" target="ordered"/>
  </state>
  <state id="ordered"/>
</scxml>"""

with ActorSystem(storage="memory", clock="virtual") as system:
    # A virtual actor is addressed by chart type and key; the first message activates it.
    cart = system.spawn(CART, type="https://example.org/charts/cart", key="alice")

    cart.subscribe(lambda s: print(s.position, s.configuration, s.context))

    cart.send("add", qty=2)       # an event is its name plus payload fields
    cart.send("add", qty=1)
    cart.send("checkout")

    print(cart.snapshot().matches("ordered"))   # True
    print(cart.as_of(position=1).context)       # {'items': 2.0}: the state after entry 1
    for entry in cart.journal():                # every event, with the transitions it took
        print(entry["position"], entry["event"]["name"])

A durable actor keeps its journal in a file and survives a restart, including timers that fell due while it was away:

with ActorSystem(storage="file", path="orders.db") as system:
    order = system.spawn(ORDER, type="https://example.org/charts/order", key="42")
    order.send("pay")             # schedules `ship` in 200 ms, durably
    system.wait(0.5)              # real time passes; the timer fires

More in the repository: examples/python (a quick start, a cart, a durable actor, Python guards and actions) and the documentation.

Things to know

  • A system belongs to the thread that created it, and the API is synchronous (no asyncio yet).
  • CEL integers arrive as Python floats, as they do in JavaScript.
  • Not yet bound: request/reply, the WebSocket transport, agents, federation and the cluster. Use the Rust crates for those.

License

MIT or Apache-2.0, at your option.

Metadata

Release files for vertep 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vertep 0.1.11
File Size Uploaded Provenance Actions
vertep-0.1.11.tar.gz 1.1 MB With provenance Details for vertep-0.1.11.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for vertep 0.1.11
File Actions
vertep-0.1.11-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for vertep-0.1.11-cp39-abi3-win_amd64.whl
vertep-0.1.11-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for vertep-0.1.11-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
vertep-0.1.11-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for vertep-0.1.11-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
vertep-0.1.11-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for vertep-0.1.11-cp39-abi3-macosx_11_0_arm64.whl
vertep-0.1.11-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for vertep-0.1.11-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 35.7 MB

Release files / vertep-0.1.11.tar.gz

Download URL vertep-0.1.11.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
8c9321af349c71a30d6e41422d8addb1b350144338f35997e3a4c3a79fedb335
BLAKE2b-256 checksum
How to use checksums
3d2b91c64c5a9ff19b4c7392f054017a75d4fff08a3aae1789e9fac4bec3e0cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / vertep-0.1.11-cp39-abi3-win_amd64.whl

Download URL vertep-0.1.11-cp39-abi3-win_amd64.whl
Size 6.6 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
44662768396d74322afc065ce4f2b5a30899896d4228e508645f266ee05af9d6
BLAKE2b-256 checksum
How to use checksums
70cecdb306230db28cdb59796a2561f01b88b41ca6ff859351b6f647073cf5ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / vertep-0.1.11-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL vertep-0.1.11-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 7.3 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
f7063c93123d591cc89ab0a85904dec1d99f767c5091ebf4b1d5cc002459c2c4
BLAKE2b-256 checksum
How to use checksums
8858cd2810afd690cdd37bc76627765f03742106d55338e2f3e0b9bd66d043f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / vertep-0.1.11-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL vertep-0.1.11-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 7.1 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
19ae996305670e349a2d0a835446684d45ff922da30b7b9d8dec1f766812dbf8
BLAKE2b-256 checksum
How to use checksums
df6b880eb99fef655d94b12d8d294e1a7e9b6894ea03c16d1f7d16c4037a4a3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / vertep-0.1.11-cp39-abi3-macosx_11_0_arm64.whl

Download URL vertep-0.1.11-cp39-abi3-macosx_11_0_arm64.whl
Size 6.6 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
29c6951054cde1b1bad327a1db4995b22fda762008ac8af08a2d84fd87144a96
BLAKE2b-256 checksum
How to use checksums
61d2186062315ba3507a56808783d82eabafb5c6cc8dc347c40a7c27696f181f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / vertep-0.1.11-cp39-abi3-macosx_10_12_x86_64.whl

Download URL vertep-0.1.11-cp39-abi3-macosx_10_12_x86_64.whl
Size 7.0 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0e0dcd7218abea72934aeae765c773b1067882b7fb0a7454cb5dc3c611027b64
BLAKE2b-256 checksum
How to use checksums
d8f8f4e77647e92576a285c61e742ba78407aecd05e6ff5de1f966ec29b929df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for vertep 0.1.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for vertep-0.1.11.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page