Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Welcome to the official tutorial to the pycodegen toolkit for numerical programming and scientific code generation. On this page, you will find a series of lessons introducing you to the various packages of the pycodegen family, including pystencils and lbmpy.

Interactive Lessons with Jupyter

The pycodegen Tutorial is meant as an interactive experience; its lessons include gaps to fill in, and exercises for which you have to write your own code. To get started, you can download the lessons as Jupyter notebooks and launch them in your local Jupyter server.

Execute the following set of commands to download and extract the tutorial notebooks; create a virtual Python environment, and install and launch the Jupyter server:

#   Download and extract
curl https://pycodegen.pages.i10git.cs.fau.de/pycodegen-tutorial/assets/pycodegen-tutorial.tar.gz | tar -xzf -

#   Move to directory
cd pycodegen-tutorial

#   Set up virtual environment and install packages
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

#   Start Jupyter Lab
jupyter lab

You can also download the notebooks archive from the following link:

This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International.

This work reuses the following components: