FAQ¶
Quick answers to the questions we get most often. If yours isn't here, check the troubleshooting guide or open an issue.
General¶
Is Wybthon production ready?
Not yet. The framework is experimental (pre-alpha) and the public API may shift between releases. We recommend it for prototypes, internal tools, and learning projects today, and we'll relax this guidance as the API stabilizes.
Does it work outside the browser?
The core reactive primitives (create_signal, create_effect, stores) work in plain CPython and are tested with pytest. Rendering, DOM, and event APIs require Pyodide because they call into the browser's document, window, and friends.
Why Python in the browser?
Wybthon lets data scientists, researchers, and tooling teams build interactive UIs without context-switching to TypeScript. Pyodide makes the entire scientific Python stack (NumPy, pandas, scikit-learn, etc.) available client-side, so you can render results without a server round-trip.
Pyodide & runtime¶
Which Pyodide version should I target?
Pin a single version per deployment. Wybthon tracks the latest stable Pyodide release (currently the 0.27 series); using the same version locally and in production avoids subtle ABI mismatches.
How do I install Python packages from PyPI?
Use micropip inside Pyodide:
The package must be either pure-Python or available as a Pyodide-compatible wheel. See the Pyodide guide for details.
How do I call a JavaScript API from Python?
Import names from the magic js module:
Convert Python objects with pyodide.ffi.to_js(...) when handing them to JS APIs that expect plain objects.
Building & shipping apps¶
Do I need a bundler or a build step?
No. Wybthon serves Python source files directly via the dev server (wyb dev --dir .) and any static host can serve them in production. See the deployment guide for hosting recipes.
Can I lazy-load route components?
Yes; see lazy and load_component. Combine them with Suspense for declarative loading UIs.
Reactivity¶
Why didn't my component re-run after a signal changed?
Because Wybthon's components run once by design. Reads inside the component body capture the value at setup time. To stay reactive, place signal accessors inside the rendered tree (span(my_signal)) or wrap them in dynamic(lambda: ...). The framework prints a dev-mode warning when it detects a destructured prop access (see warn_destructured_prop in wybthon._warnings).
How do I batch multiple signal updates?
Wrap them in batch:
Effects only run once after the batch resolves.
Next steps¶
- New here? Read Getting started.
- Looking for something to build? Browse the examples.
- Hit an unexpected error? Try the troubleshooting guide.