API: Python (r1)

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


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

For most Python coding, the pure Python APIs (no JS, just Python in editor) will be easier to use. See Python (pure) (mini) API and Python (pure) (full) API. These do organise a few things for you. If you do not like that, use this API to get full control of the page.

This API works as follows:

You can select the PyScript compiler:

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 (cus...
44 runs ♦ 0 likes
By Starter user  
Created: 1 Oct 2025
Modified: 15 Oct 2025
Python World, allowing JS also. Python and JS both in JS editor. Python 'print' function can eit...