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 # the decorator, the loader, the fallback, both framework adapters
pip install pythscribe[server] # + wasmtime: run kernels in-process on the server
pip install pythscribe[gradio] # + Gradio (the custom component ships inside the wheel)
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.8
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.8.tar.gz | 757.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pythscribe-0.2.8-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| pythscribe-0.2.8-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| pythscribe-0.2.8-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| pythscribe-0.2.8-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details |
| pythscribe-0.2.8-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.8.tar.gz
| Download URL | pythscribe-0.2.8.tar.gz |
|---|---|
| Size | 757.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6784178c0d2e08affddddddc1173d88f60f488153b963d22bd7f7fe0c9081818
|
|
BLAKE2b-256 checksum How to use checksums |
11448a6b549ba38a09c3ea8bde409bb6a1a8c6cf03979bcf20a1413654c4cefd
|
| 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.8-py3-none-win_amd64.whl
| Download URL | pythscribe-0.2.8-py3-none-win_amd64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
588084f6332d7250ab80e75bad241e4b08ea3c3ef382a088b13f5cecaf60d968
|
|
BLAKE2b-256 checksum How to use checksums |
fd333ffd39f0eeb1bff1ef0e3a2e1191ccd47b0420608314d5e762772e4b26fd
|
| 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.8-py3-none-manylinux_2_28_x86_64.whl
| Download URL | pythscribe-0.2.8-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 |
8cf2712e3015c2841ebce4bb98c9d081fc3776da93c4a8a89037a88f5d69bcbd
|
|
BLAKE2b-256 checksum How to use checksums |
383090404a8f43172400758435c73b62c93be091bffb52c043f8fbabcf47689d
|
| 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.8-py3-none-manylinux_2_28_aarch64.whl
| Download URL | pythscribe-0.2.8-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 |
cc3af6ba9eab3bf6e852c1ebdc59f8466cd5e2f003feb5aff5b985c3d9d6370c
|
|
BLAKE2b-256 checksum How to use checksums |
c123ccf312d6a5dc8ef63061df07375ed417600668d6c3a3185b54bad252d401
|
| 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.8-py3-none-macosx_11_0_x86_64.whl
| Download URL | pythscribe-0.2.8-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 |
7a43ced03bad6048bd3322a8cc93af7d05f4a029391044143b5a34ff863b359e
|
|
BLAKE2b-256 checksum How to use checksums |
c64e8827cc83712b8560c2570fb3bdcc34392b014118a1eb8e3f3a636642e26c
|
| 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.8-py3-none-macosx_11_0_arm64.whl
| Download URL | pythscribe-0.2.8-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 |
5edee853255d8ffb765fc2eb0c6e01a8f77104077c638570d15d16c460498aa8
|
|
BLAKE2b-256 checksum How to use checksums |
80e579a45b4aefb4b7052b684ac2834d3101215ec83f6e72a9df68526ab3453a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|