API: Python (r1)

API Uses canvas Graphics libraries AB framework Worlds using this API Starter Worlds
Python (r1) No PyScript No 2 Worlds Starter Worlds


This API supports Python in the browser. The basic World is still JavaScript, to allow for easy control of HTML and CSS. Python code goes in a special marked section.

For a pure Python API (no JS at all, just Python in the editor) see Python (pure) APIs.

This API works as follows:

Python 'print' and console.log are redefined:

For help on how to use Python in the Pyscript environment, see:

This API has further features:

Screenshots:



Templates


Examples

Examples of Worlds that use this API:


Python demo
37 runs ♦ 0 likes
By Starter user  
Created: 1 Oct 2025
Modified: 2 Oct 2025
Python 'print' function can either write to div or to console