<commit_before>import os

TESTING_API_KEY = 'YourApiKeyToken'
ETHERSCAN_API_KEY = os.environ.get('ETHERSCAN_API_KEY', TESTING_API_KEY)<commit_msg>Add support for a configuration file<commit_after>import os

HOME_DIR = os.path.expanduser('~')
CONFIG_FILE = '.pyetherscan.ini'
PATH = os.path.join(HOME_DIR, CONFIG_FILE)
TESTING_API_KEY = 'YourApiKeyToken'

if os.path.isfile(PATH):
    from configparser import ConfigParser
    config = ConfigParser()
    config.read(PATH)
    ETHERSCAN_API_KEY = config['Credentials']['ETHERSCAN_API_KEY']

else:
    ETHERSCAN_API_KEY = os.environ.get('ETHERSCAN_API_KEY', TESTING_API_KEY)
{'fraction_non_alphanumeric': 0.10932475884244373, 'fraction_numerical': 0.0, 'mean_word_length': 6.506024096385542, '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': '1645726', 'n_tokens_mistral': 222, 'n_tokens_neox': 228, 'n_words': 37}