Skip to main content

plexi-sdk

Python SDK v3 for building Plexi apps running inside the CPython-in-WASM runtime.

Full design spec: SDK_V3.md

Install For SDK Development

uv pip install -e ./sdk/python

Changes to sdk/python/plexi_sdk/ take effect immediately.

App Pattern

An app is three module-level functions:

from plexi_sdk import state
from plexi_sdk.effects import SetTitle, SetState
from plexi_sdk.events import KeyEvent
from plexi_sdk.ui import Column, AppBar, Text, FooterKeys


def init(size, args):
    return [SetTitle("Counter"), SetState({"count": 0})]


def update(event):
    if isinstance(event, KeyEvent) and event.key == "+" and event.pressed:
        return [SetState({"count": state.get("count", 0) + 1})]
    return []


def view():
    return Column([
        AppBar("Counter"),
        Text(str(state.get("count", 0)), bold=True, align="center"),
        FooterKeys([("+", "increment")]),
    ], grow=True)

SetState is process-local runtime state. Use PersistState when a key must survive app restart.

Games and animations should return SetSchedulerMode("continuous", fps=60) from init() and update runtime state from RenderFrame events. Do not build animation loops with timers.

Keyboard Conventions

Keys arrive in update(event) as KeyEvent. Key strings are lowercase canonical.

Physical key event.key
Enter / Return "enter"
Escape "escape"
Backspace "backspace"
Space "space"
Arrow keys "up" / "down" / "left" / "right"
Operators / Punctuation "+" / "-" / "*" / "/" / "="

New App

plexi app init myapp

Generates myapp/main.py + myapp/manifest.toml with python_compat = true.

Metadata

Release files for plexi-sdk 0.5.2

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

Source distribution (sdist)

Source distribution for plexi-sdk 0.5.2
File Size Uploaded Provenance Actions
plexi_sdk-0.5.2.tar.gz 59.3 kB Without provenance Details for plexi_sdk-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for plexi-sdk 0.5.2
File Interpreter ABI Platform Actions
plexi_sdk-0.5.2-py3-none-any.whl Python 3 none any Details for plexi_sdk-0.5.2-py3-none-any.whl

Total release size: 127.8 kB

Release files / plexi_sdk-0.5.2.tar.gz

Download URL plexi_sdk-0.5.2.tar.gz
Size 59.3 kB
Tags Source
SHA-256 checksum
How to use checksums
69936920c1146ae356c7c8253eb94af5114b62b4ec9e001474247d390a6211cb
BLAKE2b-256 checksum
How to use checksums
400bf725789e072025a9d38c1805847d544bb740d670f238852c1e2098ac90f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / plexi_sdk-0.5.2-py3-none-any.whl

Download URL plexi_sdk-0.5.2-py3-none-any.whl
Size 68.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cc57d042a9721d7749f0fbc19fba6b5de1369c6c821aa950ea84a95504eae1f8
BLAKE2b-256 checksum
How to use checksums
13084b135e1f256f2848acdfafe05b1357d8beae18a747584b8bf9ad59fdfde9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for plexi-sdk 0.5.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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