def add_password(auth_handler, uri, username, passwd, realm=None):
    """
    See: https://gist.github.com/dnozay/194d816aa6517dc67ca1
    add credentials for basic auth to the password manager
    """
    auth_handler.add_password(realm=realm, uri=uri, user=username, passwd=
        passwd)
