Playground
This page runs tapio in your browser. There is no server. When you press
Run, the page downloads a Python interpreter compiled to WebAssembly
(Pyodide), installs the same tapio wheel that ships to
PyPI, and executes the example on the browser's own event loop. The actor
scheduling you watch is real: the interpreter is genuinely running the library,
not replaying a recording.
Pick an example, read it, change it, and run it again. Every example here is
one of the modules in examples/, the same code the test suite asserts on, so
what you run is what the documentation describes.
Output appears here after you run an example.
What runs here, and what does not
Everything on this page is a local-only example: it spawns actors, sends messages, supervises, watches, and shuts down, all on one event loop. That is the half of tapio a browser can run.
The browser has no sockets and no thread pool, so three groups of examples
stay in the written documentation rather than here. Remoting and
clustering (two nodes over a TCP link, a cluster gossiping its
membership, a partition being downed) need real sockets: see
Remoting and Clustering. Blocking
offload (run_blocking) needs threads the runtime does not offer in the
browser: see Blocking calls. The ActorSystem behind a
web framework is shown under Getting started.
The first run downloads the interpreter and the wheel, which is a few megabytes, so it takes a moment. After that, every run is instant, because nothing is fetched again.