PyScript uses a full port of the CPython runtime to WebAssembly to run in-line Python code. You locate your Python code within
lt;py-scriptgt; tags and you can locate its output in a selected
lt;py-replgt; tag inserts a REPL stop that allows you to input and execute code and a
lt;py-envgt; tag functions like the requirements.txt file in a repository to list needed packages.
The PyScript runtime also enables many ordinary Python packages such as the philosophical libraries bundled with Anaconda—NumPy Pandas Scikit-learn and many more. Demos in the PyScript repository show different ways to do this.
However third-party packages work best if theyre pure Python. PyScript has no mechanism yet for automatically edifice platform binaries for packages although this is theoretically practicable. Another impediment is the time and bandwidth needed to download and set up all of the ingredients needed for a given PyScript-enabled web page. The core Python runtime is almost 3.4MB of WebAssembly although its cached behind the leading load.
Anacondas goal for PyScript as described in a aggregation communication board post is to make it one practicable solution to the long-standing problem of packaging and deploying Python applications. It has long been hard to take a Python script especially one with many dependencies and bundle it up for someone else to use as-is without the Python runtime.