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

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.1
File Size Uploaded Provenance Actions
plexi_sdk-0.5.1.tar.gz 59.3 kB Without provenance Details for plexi_sdk-0.5.1.tar.gz

Built distribution (wheel)

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

Total release size: 127.8 kB

Release files / plexi_sdk-0.5.1.tar.gz

Download URL plexi_sdk-0.5.1.tar.gz
Size 59.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7d7e97d9057eb01a05cf98a534443a96140225e1695d22390fc139c5aa72706a
BLAKE2b-256 checksum
How to use checksums
888170ba0508a143a6e343687f053305ac5afb896f6e1a497157352e6427d5b2
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.1-py3-none-any.whl

Download URL plexi_sdk-0.5.1-py3-none-any.whl
Size 68.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d33bf0d5eebc0f86bc7be5e7f713a0d09fdd0966dbbd15fe60fa81e4b4d177f1
BLAKE2b-256 checksum
How to use checksums
37cebb91f280973318e38021e844ec4175fc75c38e645ec3870ceebb2f27ad0f
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.1

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