Convert credentials into a dict.

def to_dict(self):
        """
        Convert credentials into a dict.
        """
        return dict(
            host=self.host,
            port=self.port,
            database=self.database,
            username=self.username,
            password=self.password,
        )