def fetch_credential(self, credential=None, profile=None):
q = self.db.get(self.query.profile == profile)<EOL>if q is not None:<EOL><INDENT>return q.get(credential)<EOL><DEDENT>
Fetch credential from credentials file.

        Args:
            credential (str): Credential to fetch.
            profile (str): Credentials profile. Defaults to ``'default'``.

        Returns:
            str, None: Fetched credential or ``None``.