<commit_before><commit_msg>Actually add the api_utils module<commit_after>from ConfigParser import SafeConfigParser
import os

def read_config(request):
    app_name = "api"
    conf = SafeConfigParser(allow_no_value=True)
    localconfig_filename = "%s/applications/%s/private/localconfig" % (request.env.web2py_path, app_name)

    if os.path.isfile(localconfig_filename):
        conf.readfp(open(localconfig_filename))
    else:
        filename = "%s/applications/%s/private/config" % (request.env.web2py_path, app_name)
        conf.readfp(open(filename))

    repo_path   = conf.get("apis","repo_path")
    repo_remote = conf.get("apis", "repo_remote")
    git_ssh     = conf.get("apis", "git_ssh")
    pkey        = conf.get("apis", "pkey")

    return repo_path, repo_remote, git_ssh, pkey
{'fraction_non_alphanumeric': 0.12656641604010024, 'fraction_numerical': 0.002506265664160401, 'mean_word_length': 4.121794871794871, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4585137', 'n_tokens_mistral': 270, 'n_tokens_neox': 262, 'n_words': 45}