3. Authentication

Send our username and password

We need to pass our username and password in our request. We need to keep track of the response.

Close the text editor and go back in the shell.

    username = input('username (e.g. admin): ')
    password = getpass.getpass('password: ')

We want to use getpass.getpass(‘password: ‘) so the password doesn’t get echoed to the screen. IDLE will still echo the password, but you can ignore this for testing and development.