Skip to content

Using This Tutorial

Each of the examples in this tutorial can be run on PyScript.com, a web environment that lets you write, test, and share PyScript code. Alternatively, you can clone the PuePy git repo and run a live web server with each example included.

The PyScript.com environment uses the PuePy .whl file, as downloadable from PyPi, while the examples in the git repository are served with PuePy directly from source files on disk.

Using PyScript.com

Navigate to https://pyscript.com/@kkinder/puepy-tutorial/latest and you are greeted with a list of files on the left, a code editor in the middle, and a running example on the left. Each chapter in the tutorial corresponds with a directory in tutorial folder on the left.

CleanShot 2024-06-30 at 10.47.31@2x.png

You can clone the entire examples project and edit it yourself to continue your learning:

CleanShot 2024-06-30 at 10.49.13.gif

Once cloned you make your own changes and experiment with them in real time.

Editing locally

After cloning puepy on git, you can run the examples using a simple script:

CleanShot 2024-06-30 at 10.52.57@2x.png

http://localhost:8000/ show you a list of examples

CleanShot 2024-06-30 at 10.54.52@2x.png

As you edit them in the examples folder and reload the window, your changes will be live.

Live Examples

Most of the examples you see live in this tutorial include example code running live in a browser like this:

There, you can see the running example inline with its explanation. You can also edit the code on PyScript.com by navigating to its example folder and cloning the project, as described above.