realm, uri, user, passwd are as for HTTPPasswordMgr.add_password(). is_authenticated sets the initial value of the is_authenticated flag for the given URI or list of URIs. If is_authenticated is specified as True, realm is ignored.
urllib.request/HTTPPasswordMgrWithPriorAuth.add_password
HTTPPasswordMgrWithPriorAuth.add_password