def connection(self):
        """Get a steady, persistent PyGreSQL connection."""
        try:
            con = self.thread.connection
        except AttributeError:
            con = self.steady_connection()
            self.thread.connection = con
        return con
Get a steady, persistent PyGreSQL connection.