def update_token_tempfile ( token ) : with open ( tmp , 'w' ) as f : f . write ( json . dumps ( token , indent = 4 ) )
how to save a file from an api token python
Example of function for token update
def update_token_tempfile(token):
    """
    Example of function for token update
    """
    with open(tmp, 'w') as f:
        f.write(json.dumps(token, indent=4))