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

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

Built distributions (wheels)

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

Total release size: 35.7 MB

Release files / vertep-0.1.9.tar.gz

Download URL vertep-0.1.9.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a21e71642a0f5d1a82899d1a702da3f316fe14c8ac48759a356711048a40fff3
BLAKE2b-256 checksum
How to use checksums
144e2e0547107c747e15ff2eb8ff4381cd3e237e57aa2cadf2e353dc5dd20c5a
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.9-cp39-abi3-win_amd64.whl

Download URL vertep-0.1.9-cp39-abi3-win_amd64.whl
Size 6.6 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
37551526745219e2d9ba73788a0c7573686b2947c4eb0b91e794a3ea5048c49f
BLAKE2b-256 checksum
How to use checksums
055069b2f69da9196c65e6db76c86f8707c8243f939a5c07a385e7b5a8f01ae6
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.9-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL vertep-0.1.9-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
7b9f9511b6a614342a1923e234a9dd766cdadf728e40d62132e3af6b789bcc6c
BLAKE2b-256 checksum
How to use checksums
000516579cc3e3ace5d4b04f60eb833434f84107e4864511b1b2d926cb248174
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.9-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL vertep-0.1.9-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
a26709b45f28bc4559c73ac3de27cabd75c454df7757570c15973b52ed8b32c2
BLAKE2b-256 checksum
How to use checksums
810352b0a3f65dae6db27774e8e774525ac805cbfcf3f4820e1c0a71b0f1c906
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.9-cp39-abi3-macosx_11_0_arm64.whl

Download URL vertep-0.1.9-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
c28b25b2c7b7f90f0ed74944b1d23b0342a3b20acb97af140c7752d7ece979ba
BLAKE2b-256 checksum
How to use checksums
0d1fed4b8564bfe832ad98f55d5813f1e55b0c718ba51ebb3ba0bc3e73e577df
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.9-cp39-abi3-macosx_10_12_x86_64.whl

Download URL vertep-0.1.9-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
94dc6d23535caaae28a346b5d766e1bede6a6b364a134746f79a91773e370ee6
BLAKE2b-256 checksum
How to use checksums
dce4d8dea291f9a440a78c92db78c5591795d7b470559a57a8b4058c6b2c7874
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.9

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