Python-In-The-Browser

Examples & resources on how to use Python in the web browser.
Show your support!
</p>

Compilers

Click to view the list of compilers
[cpython-emscripten:](https://github.com/dgym/cpython-emscripten) Python in the browser - CPython compiled with emscripten. [Pyodide:](https://github.com/pyodide/pyodide) is a Python distribution for the browser and Node.js based on WebAssembly. [pypyjs:](https://github.com/pypyjs/pypyjs) PyPy compiled to JavaScript. [Batavia:](https://github.com/beeware/batavia) A JavaScript implementation that uses a virtual machine to run precompiled Python bytecode. [Skulpt:](https://github.com/skulpt/skulpt) is a Javascript implementation of Python 2.x. [Transcrypt:](https://github.com/qquick/transcrypt) Python 3.7 to JavaScript compiler - Lean, fast, open! [PyScript:](https://github.com/pyscript/pyscript) a project that aims to combine multiple open technologies into a framework that allows users to create sophisticated browser applications with Python. [RapydScript:](https://github.com/atsepkov/RapydScript) transpiler for a Python like language to JavaScript. [RapydScript-ng:](https://github.com/kovidgoyal/rapydscript-ng) A improved community fork of RapydScript.


There are many projects that have focused on using Python into the web browser. Tho they do have some differences, this comparision table Python-in-the-browser technologies & the photos below will help you understand some of the differences in some of these projects / compilers.

Click to view the photos
</img> </img> Images Taken From : Running Python in the Browser - Yasoob Khalid


Extra Resource

PyCon AU 2018: A Web without JavaScript A video / talk about using Python in the Web Browser by @freakboy3742 (Founder of BeeWare & was a previous president of the Django Software Foundation)


Examples

Brython Examples For more detailed info on how to use Brython visit the [Brython documentation](https://brython.info/static_doc/en/intro.html) page - **Show Input Value** [Source](https://github.com/MarketingPipeline/Python-In-The-Browser/blob/main/demos/brython/show_input_value.html), [Demo](https://marketingpipeline.github.io/Python-In-The-Browser/demos/brython/show_input_value.html) - **Check if Input Is Integer** [Source](https://github.com/MarketingPipeline/Python-In-The-Browser/blob/main/demos/brython/check_if_interger.html), [Demo](https://marketingpipeline.github.io/Python-In-The-Browser/demos/brython/check_if_interger.html) - **Adding Integers** [Source](https://github.com/MarketingPipeline/Python-In-The-Browser/blob/main/demos/brython/adding_intergers.html), [Demo](https://marketingpipeline.github.io/Python-In-The-Browser/demos/brython/adding_intergers.html)
PyScript Examples For more detailed info on how to use PyScript visit the [PyScript documentation](https://github.com/pyscript/pyscript/blob/main/docs/tutorials/getting-started.md) page - **Show Input Value** [Source](https://github.com/MarketingPipeline/Python-In-The-Browser/blob/main/demos/PyScript/show_input_value.html), [Demo](https://marketingpipeline.github.io/Python-In-The-Browser/demos/PyScript/show_input_value.html) - **Check if Input Is Integer** [Source](https://github.com/MarketingPipeline/Python-In-The-Browser/blob/main/demos/PyScript/check_if_interger.html), [Demo](https://marketingpipeline.github.io/Python-In-The-Browser/demos/PyScript/check_if_interger.html) - **Adding Integers** [Source](https://github.com/MarketingPipeline/Python-In-The-Browser/blob/main/demos/PyScript/adding_integers.html), [Demo](https://marketingpipeline.github.io/Python-In-The-Browser/demos/PyScript/adding_integers.html)

Contributing GitHub

Want to help improve this repo? Create a pull request with your detailed changes! If approved you will be added to the list of contributors of this awesome repo!

See also the list of contributors who participate in this project.

License License: CC BY-NC 4.0</img>

This repo is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License - see the LICENSE.md file for details.