opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

PyScript is an open source platform for Python in the browser.
GitHub RepoImpressions136

Project Description

View on GitHub

Run Python in the Browser with PyScript

Ever wanted to write Python that runs directly in the browser—no server, no backend, just pure client-side magic? Meet PyScript, an open-source platform that lets you execute Python (and MicroPython) right in the browser using WebAssembly (WASM).

No more wrestling with JavaScript just to build interactive web apps. With PyScript, you can leverage Python’s simplicity and power for frontend development, data visualization, and even embedded scripting.

What It Does

PyScript bridges Python and the web by compiling Python code to WASM via Pyodide (CPython) or MicroPython. It’s as simple as dropping a <script> tag into your HTML:

<!doctype html>
<html>
  <head>
    <script type="module" src="https://pyscript.net/releases/2025.7.2/core.js"></script>
  </head>
  <body>
    <script type="py">
      print("Hello, browser!")
    </script>
  </body>
</html>

No setup, no build step—just Python running where JavaScript usually reigns.

Why It’s Cool

  • No Backend Needed – Run Python logic directly in the browser, opening doors for client-side data processing, interactive tutorials, and lightweight apps.
  • Familiar Syntax – Use Python’s rich ecosystem (libraries like NumPy, Pandas, and Matplotlib work via Pyodide).
  • MicroPython Support – Perfect for embedded scripting or IoT-like projects in the browser.
  • Live REPL & Terminal – Debug or experiment right in the page with built-in terminal output.

Check out the example gallery for demos, including data visualizations, games, and even a Python-powered calculator.

How to Try It

  1. Grab the latest release and include it in your HTML.
  2. Write Python inside <script type="py"> tags.
  3. Open your browser—no server required.

For a zero-setup playground, use the PyScript Online IDE.

Final Thoughts

PyScript isn’t just a novelty—it’s a practical tool for Python devs who want to break into the browser without learning JavaScript. While it’s not a replacement for JS in performance-critical apps, it’s fantastic for prototyping, education, and lightweight tools.

The project is actively developed (18.5k GitHub stars and counting), with a friendly Discord community and regular community calls. Give it a spin and see how Python feels on the frontend.

—

Follow us @githubprojects for more open-source highlights. 🚀

Back to Projects
Project ID: 1953311518659100778Last updated: August 7, 2025 at 04:25 AM