def main(): parser = argparse.ArgumentParser() parser.add_argument(OPTION_API_KEY) all_option = parser.parse_args() if all_option.api_key is None: raise BunqException(ERROR_OPTION_MISSING_API_KEY) api_context = ApiContext(ApiEnvironmentType.PRODUCTION, all_option.api_key, socket.gethostname()) api_context.save(DEFAULT_BUNQ_CONFIGURATION_FILE_NAME_PRODUCTION)
from bunq.sdk.context import ApiContext, BunqContext from bunq.sdk.context import ApiEnvironmentType import socket apiContext = ApiContext( ApiEnvironmentType.SANDBOX, "sandbox_ae9afa8798dc521804bd1d8900167457243b9fd323e6799a9d42d75d", socket.gethostname()) apiContext.save("bunq.conf") BunqContext.load_api_context(apiContext)