solvebio/cli/auth.py
def login(*args, **kwargs):
    """
    Prompt user for login information (domain/email/password).
    Domain, email and password are used to get the user's API key.

    Always updates the stored credentials file.
    """
    if args and args[0].api_key:
        # Handle command-line arguments if provided.
        solvebio.login(api_key=args[0].api_key)
    elif kwargs:
        # Run the global login() if kwargs are provided
        # or local credentials are found.
        solvebio.login(**kwargs)
    else:
        interactive_login()

    # Print information about the current user
    user = client.whoami()

    if user:
        print_user(user)
        save_credentials(user['email'].lower(), solvebio.api_key)
        _print_msg('Updated local credentials.')
        return True
    else:
        _print_msg('Invalid credentials. You may not be logged-in.')
        return False
def login(*args, **kwargs):
    """
    Prompt user for login information (domain/email/password).
    Domain, email and password are used to get the user's API key.

    Always updates the stored credentials file.
    """
    if args and args[0].api_key:
        # Handle command-line arguments if provided.
        solvebio.login(api_key=args[0].api_key)
    elif kwargs:
        # Run the global login() if kwargs are provided
        # or local credentials are found.
        solvebio.login(**kwargs)
    else:
        interactive_login()

    # Print information about the current user
    user = client.whoami()

    if user:
        print_user(user)
        save_credentials(user['email'].lower(), solvebio.api_key)
        _print_msg('Updated local credentials.')
        return True
    else:
        _print_msg('Invalid credentials. You may not be logged-in.')
        return False
def login ( * args , * * kwargs ) : if args and args [ 0 ] . api_key : # Handle command-line arguments if provided. solvebio . login ( api_key = args [ 0 ] . api_key ) elif kwargs : # Run the global login() if kwargs are provided # or local credentials are found. solvebio . login ( * * kwargs ) else : interactive_login ( ) # Print information about the current user user = client . whoami ( ) if user : print_user ( user ) save_credentials ( user [ 'email' ] . lower ( ) , solvebio . api_key ) _print_msg ( 'Updated local credentials.' ) return True else : _print_msg ( 'Invalid credentials. You may not be logged-in.' ) return False
Prompt user for login information (domain/email/password).
    Domain, email and password are used to get the user's API key.

    Always updates the stored credentials file.
Prompt user for login information ( domain / email / password ) . Domain email and password are used to get the user s API key .