def get_jira(profile=None, url="http://localhost:2990", username="admin", password="admin", appid=None, autofix=False, verify=True):
    def findfile(path):
        """
        Find the file named path in the sys.path.
        Returns the full path name if found, None if not found
        """
        paths = ['.', os.path.expanduser('~')]
        paths.extend(sys.path)
        for dirname in paths:
            possible = os.path.abspath(os.path.join(dirname, path))
            if os.path.isfile(possible):
                return possible
        return None
    config = configparser.ConfigParser(defaults={'user': None, 'pass': None, 'appid': appid, 'autofix': autofix,
                                                 'verify': 'yes' if verify else 'no'})

    config_file = findfile('config.ini')
    if config_file:
        logging.debug("Found %s config file" % config_file)

    if not profile:
        if config_file:
            config.read(config_file)
            try:
                profile = config.get('general', 'default-jira-profile')
            except configparser.NoOptionError:
                pass

    if profile:
        if config_file:
            config.read(config_file)
            url = config.get(profile, 'url')
            username = config.get(profile, 'user')
            password = config.get(profile, 'pass')
            appid = config.get(profile, 'appid')
            autofix = config.get(profile, 'autofix')
            verify = config.getboolean(profile, 'verify')

        else:
            raise EnvironmentError(
                "%s was not able to locate the config.ini file in current directory, user home directory or PYTHONPATH." % __name__)

    options = JIRA.DEFAULT_OPTIONS
    options['server'] = url
    options['autofix'] = autofix
    options['appid'] = appid
    options['verify'] = verify

    return JIRA(options=options, basic_auth=(username, password))
    # self.jira.config.debug = debug
A descriptor that wraps a PyMongo read method like find_one() that
dataset/ETHPy150Open pycontribs/jira/jira/config.py/get_jira--crossover with--dataset/ETHPy150Open mongodb/motor/motor/metaprogramming.py/AsyncRead.__init__