I'm curious if Quarto could coordinate all of that for you automatically. It supports both code execution via Jupyter, and output via Typst (including books).
https://quarto.org/docs/computations/python.html
https://quarto.org/docs/output-formats/typst.html
https://quarto.org/docs/books/book-output.html#typst-output
https://quarto.org/docs/output-formats/typst-custom.html#boo...