def store_credentials(opts: ProxyContext, client: CumulocityClient):
    'Store credentials to the environment file. It creates\n    the file if it does not already exist.\n\n    The file will only be written to if it has changed.\n\n    Args:\n        opts (ProxyContext): Proxy options\n        client (CumulocityClient): Cumulocity client containing valid\n            credentials\n    '
    changed = save_env(opts.env_file, {'C8Y_HOST': client.url, 'C8Y_USER': client.user, 'C8Y_TENANT': client.tenant, 'C8Y_TOKEN': client.token})
    if changed:
        opts.show_message(f'Env file was updated: {opts.env_file}')
    else:
        opts.show_info(f'Env file is already up to date: {opts.env_file}')
Store credentials to the environment file. It creates
the file if it does not already exist.

The file will only be written to if it has changed.

Args:
    opts (ProxyContext): Proxy options
    client (CumulocityClient): Cumulocity client containing valid
        credentials
def store_credentials(opts: ProxyContext, client: CumulocityClient):
    'Store credentials to the environment file. It creates\n    the file if it does not already exist.\n\n    The file will only be written to if it has changed.\n\n    Args:\n        opts (ProxyContext): Proxy options\n        client (CumulocityClient): Cumulocity client containing valid\n            credentials\n    '
    changed = save_env(opts.env_file, {'C8Y_HOST': client.url, 'C8Y_USER': client.user, 'C8Y_TENANT': client.tenant, 'C8Y_TOKEN': client.token})
    if changed:
        opts.show_message(f'Env file was updated: {opts.env_file}')
    else:
        opts.show_info(f'Env file is already up to date: {opts.env_file}')