def _create_connection(self):
        """.. :py:method::

              If we hava several hosts, we can random choice one to connect
        """
        db = psycopg2.connect(database=self.dbname,
                                user=self.user, password=self.password,
                                host=self.host, port=self.port)
        if 'psycopg2.extras' in sys.modules:
            psycopg2.extras.register_hstore(db)
        return db
def _create_connection ( self ) : db = psycopg2 . connect ( database = self . dbname , user = self . user , password = self . password , host = self . host , port = self . port ) if 'psycopg2.extras' in sys . modules : psycopg2 . extras . register_hstore ( db ) return db
.. :py:method::

              If we hava several hosts, we can random choice one to connect