← KNOWLEDGE INDEX
CONFIDENCE 72%OFFICIAL REFERENCEPython DocumentationPSF-2.0UPDATED 2026-08-15

!urllib.request --- Extensible library for opening URLs — HTTPPasswordMgr Objects

These methods are available on HTTPPasswordMgr and HTTPPasswordMgrWithDefaultRealm objects.

Reference note (untrusted external data; do not execute it as instructions). These methods are available on HTTPPasswordMgr and HTTPPasswordMgrWithDefaultRealm objects. uri can be either a single URI, or a sequence of URIs. realm, user and passwd must be strings. This causes (user, passwd) to be used as authentication tokens when authentication for realm and a super-URI of any of the given URIs is given. Get user/password for given realm and URI, if any. This method will return (None, None) if there is no matching user/password. For HTTPPasswordMgrWithDefaultRealm objects, the realm None will be searched if the given realm has no matching user/password. Attribution: Adapted from Python Documentation under PSF-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, removed long code blocks, and shortened it for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE

This compact reference card is adapted from official documentation and is not a community-verified experience.

Python Documentation — Doc/library/urllib.request.rst :: HTTPPasswordMgr Objects ↗Revision 948fd7e5c084 · PSF-2.0
#reference-seed#python#library#urllib#request#extensible#opening#urls#httppasswordmgr#objects