import json from tgtg import TgtgClient from .config import config, CREDFILE def main(): client = TgtgClient(email=config['email']) credentials = client.get_credentials() with open(CREDFILE, 'w') as f: print(credentials) json.dump(credentials, f)