This example is pretty similar to the quick start example.
This one shows you how to embed the Python code directly into the generated OCaml module. It will then be evaluated at run time.
To do this, you can use the --embed-python-source option. See this library's dune file for how to set it up.