pythscribe — @wasm for ordinary Python
One decorator. Your function stays Python. It runs compiled — in the browser tab, in-process on the server (sandboxed, GIL-free, bit-for-bit), or as plain Python when nothing is built — and you can always tell which.
pip install pythscribe # everything: the @wasm decorator, the compiler, the wasm runtime, both adapters
pip install pythscribe[gradio] # + Gradio (the custom component ships inside the wheel)
pip install pythscribe[streamlit] # + Streamlit
pip install pythscribe[web-bundled] # + a vendored Node for the `.ps` frontend tooling (uses system Node if present)
@wasm runs in-process (compiled to WebAssembly) out of the box — the wasm runtime ships in the base
install. Run pyths doctor to see what your machine can do (compiler, wasm runtime, Node, adapters).
from pythscribe import wasm
@wasm
def dot(xs: list[float], ys: list[float]) -> float:
acc = 0.0
for i in range(len(xs)):
acc = acc + xs[i] * ys[i]
return acc
python -m pythscribe.build kernels.py # compile each @wasm def with `pyths` -> __pythscribe__/<fn>/
Without the build step the function is still your function (plain Python). With it, the same call runs the compiled kernel, and the decorator tells you which path ran:
>>> from pythscribe import binding_of
>>> binding_of(dot).mode # 'server' | 'browser' | 'fallback'
'server'
Documentation & demos
- Installation, supported platforms, and the full guide — see the project README (Installation section).
- Runnable demos (Gradio and Streamlit, browser + server) —
demos/. - Worked examples (
@wasmkernels, image preprocessing, typed arrays) —examples/.
Licence
The pip package is MIT (pythscribe/LICENSE). The wheel bundles the pyths compiler binary
(pythscribe/_bin/, FSL-1.1-ALv2), so the wheel's licence expression is
MIT AND LicenseRef-FSL-1.1-ALv2; its .dist-info/licenses/ carries both texts, the vendored runtime's
notice, a per-installed-path map, and the third-party notices of the crates linked into the binary.
Compiled output of your own code is yours.
Release files for pythscribe 0.2.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pythscribe-0.2.9.tar.gz | 759.1 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pythscribe-0.2.9-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| pythscribe-0.2.9-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| pythscribe-0.2.9-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| pythscribe-0.2.9-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details |
| pythscribe-0.2.9-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 17.5 MB
Release files / pythscribe-0.2.9.tar.gz
| Download URL | pythscribe-0.2.9.tar.gz |
|---|---|
| Size | 759.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd13de65f5fc7922c55e0faa08bc4d351f02896762da552e2f0108f26cab6c84
|
|
BLAKE2b-256 checksum How to use checksums |
5dcbd074e16417086f55eee48d14ae59f3a24d52ebc4ccf5d4e7ac845e438cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pythscribe-0.2.9-py3-none-win_amd64.whl
| Download URL | pythscribe-0.2.9-py3-none-win_amd64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
23b431976c05010b77e6cb40b470fe184d5475dd64a3b41ae9cccf6560ead10e
|
|
BLAKE2b-256 checksum How to use checksums |
7b89a3c98d080a9ab9abd406d0ccd0bfe5b620d27ee4d82d6767c296dd610b6a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pythscribe-0.2.9-py3-none-manylinux_2_28_x86_64.whl
| Download URL | pythscribe-0.2.9-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
ea0e779a58c99d164893b7f8857551937ed195bec99cb46c7c5294ffae4b6680
|
|
BLAKE2b-256 checksum How to use checksums |
d3934386528b239cf971deafd35cab64a6069fd0f05e81769179a5f2900936a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pythscribe-0.2.9-py3-none-manylinux_2_28_aarch64.whl
| Download URL | pythscribe-0.2.9-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 3.3 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
b890c7739ae06498275cad05846cfbb83393d85eb3faea789dda745445c67cfb
|
|
BLAKE2b-256 checksum How to use checksums |
fb8117097714185d65bfffc22d581ab9051858d00947c377f0f6f20f1e07279a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pythscribe-0.2.9-py3-none-macosx_11_0_x86_64.whl
| Download URL | pythscribe-0.2.9-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
9476d694c765581b4b09c2ba7689b8ea5423080198d5ce3f45fb19f8fcdae1e6
|
|
BLAKE2b-256 checksum How to use checksums |
8e8dbf00cb92aa538ed1a27f06e0daeba8001e9700037c2cdd83920235865bb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pythscribe-0.2.9-py3-none-macosx_11_0_arm64.whl
| Download URL | pythscribe-0.2.9-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.2 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
4168afe1f9d0167f9a5810a1ca856a2adc8fa29a158c34aa7b60f3f8fa3ce665
|
|
BLAKE2b-256 checksum How to use checksums |
243cd3f6e3c355d75610938409c5f446f4e2bc055d65ef98ae2bb008000ea7d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|