Oh, sure. I mean, the first reason is because I am a backend engineer and all I know is python! The second reason is that it made it easy for me to iterate - you have no idea how painstakingly I adjusted the line thickensss, spacing, margins, etc. So being able to just update a little config file was super useful. And, finally, for future product lines (different sizes, for example) using code made it easy for me to, essentially, provide the dimensions of the book and have the code make the "right" design choices to generate a new PDF.
Couldn’t you just make it in Adobe InDesign? Cool item, btw. I used to play saxophone years back.