Declare Python dependencies in a <py-config> block so PyScript loads them via Pyodide and micropip before any <py-script> runs. This enables browser-only demos with pure-Python packages while trading load size and memory for serverless execution.
Learn how PyScript's <py-env> tag lets you declare Python package dependencies directly in HTML, letting micropip fetch and install them automatically.
PyScript's <py-config> tag declares Python packages in TOML/JSON; micropip installs WASM wheels at load time, caching them in IndexedDB. Works for pure-Python and Pyodide-built binaries, but lacks full dependency resolution and fails on missing wheels.
Choose between static preload via py-config and dynamic micropip install in PyScript. Compare startup latency, bundle size, offline use and maintenance, with concrete HTML examples and a validation approach.
Symptom When the <py-env> tag is updated to request a newer version of a pure‑Python wheel, subsequent <py-script> blocks sometimes fail with ModuleNotFoundError or continue to use the old cached version. Goal Determine a reliable pattern that lets a small browser‑based application load a new package version without a full page reload while guara
Reproducible dependency resolution is required for PyScript pages that declare Python packages via . The packages array is documented as the configuration point for micropip installs at page load. The current specification does not define an explicit version constraint mechanism, a lockfile format, or environment markers for the packages list. It is unclear
Goal: create a fully repeatable PyScript development environment that works without network access by pinning the PyScript runtime and declaring required pure‑Python packages in a <py-config> block. Constraint: micropip, which resolves the packages list, can only fetch wheels from PyPI and requires an active connection; the current documentation does n