Docs

The short built-in reference. Full documentation lives at pythsol.com/docs.

Quick start

pip install "pythsol[test]"
pythsol init app --template counter
cd app
pythsol check programs/app.py
pythsol test
pythsol build

pythsol test needs pytest and solders. pythsol build needs the SBF platform tools (pythsol doctor names them).

Language

Annotated integers u8 through u128 and i8 through i128, bool, Pubkey, Signer, Mut, Init, FixedArray, Option, FixedString, Vec[T, N], unit enums, and data enums written as Name: u64.

Still rejected: a Vec with no capacity, f-strings, and a generic on-chain invoke. One PDA seed, letters, digits, and _.

A fixed-range list comprehension, [base + i for i in range(4)], initializes a FixedArray[T, 4] local at compile time.

CLI

pythsol doctor
pythsol check PROGRAM.py
pythsol build PROGRAM.py
pythsol test
pythsol idl PROGRAM.py
pythsol client PROGRAM.py -o client.py
pythsol deploy --dry-run --so program.so
pythsol serve

Playground

The playground loads counter, ledger, vault, escrow, multisig, and poll. Check and Show C use the compiler. Compile .so runs clang when this server is on loopback and the tools are installed.

A longer docs site is also built with Starlight from web/docs (npm run build, then serve dist/). This page is the one that ships with pythsol serve.