How to use PyCall to connect to Splunk's SDK-python?

You are right!
Your solution is better than mine.