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.10

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.10
File Size Uploaded Provenance Actions
vertep-0.1.10.tar.gz 1.1 MB With provenance Details for vertep-0.1.10.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for vertep 0.1.10
File Actions
vertep-0.1.10-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for vertep-0.1.10-cp39-abi3-win_amd64.whl
vertep-0.1.10-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.10-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
vertep-0.1.10-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for vertep-0.1.10-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
vertep-0.1.10-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for vertep-0.1.10-cp39-abi3-macosx_11_0_arm64.whl
vertep-0.1.10-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for vertep-0.1.10-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 35.7 MB

Release files / vertep-0.1.10.tar.gz

Download URL vertep-0.1.10.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
eda10620e345445741442821a84b0822428f6a7ef383e7d3b6ffb13e6048171b
BLAKE2b-256 checksum
How to use checksums
d9fa56d83993bff0a50a1edee932606ce92fe6e741819837bbbdd750c7ddbcba
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 15, 2026.

Transparency log

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

Download URL vertep-0.1.10-cp39-abi3-win_amd64.whl
Size 6.6 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
6d77ea4826d9e2c3781b79dbd5159babec501b200cc2d5fa00979e0e2735a6f8
BLAKE2b-256 checksum
How to use checksums
101015c164e3c2b0763329ddb4e72426c996aaabbe8f04edc85e70013209de32
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 15, 2026.

Transparency log

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

Download URL vertep-0.1.10-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
cff84ad06ff5c5b1274a16b1cf3ef2dba7d5c134b8a2683191819d7b6f29d24f
BLAKE2b-256 checksum
How to use checksums
4b284bf516de66f6c105138fe2665a4fd9687f710d9a542c0086081b006c73f8
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 15, 2026.

Transparency log

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

Download URL vertep-0.1.10-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
1618e86413977c02d40fe7bdc15b0cb69093d7a64e2a06ace95d23c595cf892d
BLAKE2b-256 checksum
How to use checksums
22cd68f7da6bb2080e9d0caebd6fb6066275c8944ae37cc7d486c74e7552dc16
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 15, 2026.

Transparency log

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

Download URL vertep-0.1.10-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
b1920a71b4bb40d3a07ca0ae54b0287d5dc609b86d79e4bfa50ab092fa085a00
BLAKE2b-256 checksum
How to use checksums
d0bf343e35e005a188214268eb148a050bd93b60e768f74f4741de053805b3e4
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 15, 2026.

Transparency log

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

Download URL vertep-0.1.10-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
7db7a33c926697f6ec10ffe849d76ffb5ae0904026635dc5a32a7a0e28a3cb59
BLAKE2b-256 checksum
How to use checksums
3d0eaf83e2593346ab1ed4574a37249e09ae87e0ef05c77e44b1206b5166b47e
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 15, 2026.

Transparency log

Security for vertep 0.1.10

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.10.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 15, 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