Python Class Run Function Postgresql Database Configuration