There are a few options I found, none of which completely address this issue.
1. Evaluating Python directly in the buffer
Python can be evaluated in the buffer with the function "eval-region-as-py" from Emacs SE - How to evaluate the selection through Python and replace the selection with it's result?. This returns the result in the buffer.