Modularize python connection

Python connection in own module - set up for future integration tests in mind