If we include PEP 723 headers in all of our examples, they will run with tools like uv run or pipx run without needing to create an environment and install the dependencies into it first.
This would basically amount to placing the following comments at the top of each example file (before the first non-comment line):
# /// script
# dependencies = ["cuda_bindings"]
# ///
Some of our examples, like gl_interop_plasma.py have additional dependencies, e.g. pyglet, and those can also be added in this header.
If we include PEP 723 headers in all of our examples, they will run with tools like
uv runorpipx runwithout needing to create an environment and install the dependencies into it first.This would basically amount to placing the following comments at the top of each example file (before the first non-comment line):
Some of our examples, like
gl_interop_plasma.pyhave additional dependencies, e.g.pyglet, and those can also be added in this header.