I’m sure you could do something like this, but note that some hosts might have a problem when you try to load plugins that run Python processes. I’ve seen this before. On the other hand if you only want to run this inside of Cabbage there shouldn’t be any problems.
If you are already familiar with Python, I think you might be better writing a Python program that hosts Csound. That would give you the most options. If you want to try running Csound from Python take a look at using ctcsound, which is the best way to do this. You can find docs for it here. I use this framework to prepare spectrograms and graphs for my instruments when I’m teaching synthesis. It works nicely with SciPy. Victor Lazzarini’s Computer Instrument book covers a lot of how to get going with this, and is definitely worth a read.