OP surely already knows this, but for everyone else in this thread - for live music coding, got to mention Sonic Pi (https://sonic-pi.net and https://github.com/sonic-pi-net/sonic-pi) which is absolutely amazing at what it does; it's Ruby and not Python, but some ideas are quite brilliant.
Edit: but to clarify yes pippi is meant primarily to facilitate writing generative musical scores in python. (Scores which produce sounds, not notation.) I have used it to perform from early on in its development, and IMHO it works fine for this, but the main use case is to render offline audio.