Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command line prompts for authentication to sample scripts #63

Open
airwoflgh opened this issue Nov 14, 2024 · 0 comments · May be fixed by #65
Open

Add command line prompts for authentication to sample scripts #63

airwoflgh opened this issue Nov 14, 2024 · 0 comments · May be fixed by #65

Comments

@airwoflgh
Copy link

Description

To make command line execution easier, add in a check to prompt for e-mail address and password when the environment variables are not populated.

Proposed change

At the end of the imports, add:

import getpass

Just after the environment variable read in:

if not USERNAME:
    USERNAME = input('Enter e-mail address: ')

if not PASSWORD:
    try:
        PASSWORD = getpass.getpass()
    except Exception as error:
        print('ERROR: ', error)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant