module documentation

PyPI and direct package downloading.

Class ContentChecker A null content checker that defines the interface for checking content
Class Credential A username/password pair. Use like a namedtuple.
Class HashChecker No class docstring; 0/3 instance variable, 0/1 class variable, 0/4 method, 1/1 class method documented
Class PackageIndex A distribution index that scans web pages for download URLs
Class PyPIConfig No class docstring; 0/1 property, 2/3 methods documented
Function decode_entity Undocumented
Function distros_for_filename Yield possible egg or source distribution objects based on a filename
Function distros_for_location Yield egg or source distribution objects based on basename
Function distros_for_url Yield egg or source distribution objects that might be found at a URL
Function egg_info_for_url Undocumented
Function find_external_links Find rel="homepage" and rel="download" links in `page`, yielding URLs
Function fix_sf_url Undocumented
Function htmldecode Decode HTML entities in the given text.
Function interpret_distro_name Generate the interpretation of a source distro name
Function local_open Read a local path, with special support for directories
Function open_with_auth Open a urllib2 request, handling HTTP authentication
Function parse_bdist_wininst Return (base,pyversion) or (None,None) for possible .exe name
Function parse_requirement_arg Undocumented
Function socket_timeout Undocumented
Function unique_values Wrap a function returning an iterable such that the resulting iterable only ever yields unique items.
Constant EGG_FRAGMENT Undocumented
Constant EXTENSIONS Undocumented
Constant HREF Undocumented
Constant PYPI_MD5 Undocumented
Constant REL Regex for an HTML tag with 'rel="val"' attributes.
Constant URL_SCHEME Undocumented
Variable entity_sub Undocumented
Variable user_agent Undocumented
Function _encode_auth Encode auth from a URL suitable for an HTTP header. >>> str(_encode_auth('username%3Apassword')) 'dXNlcm5hbWU6cGFzc3dvcmQ='
Function _splituser splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.
Constant _SOCKET_TIMEOUT Undocumented
Variable _tmpl Undocumented
def decode_entity(match): (source)

Undocumented

def distros_for_filename(filename, metadata=None): (source)

Yield possible egg or source distribution objects based on a filename

def distros_for_location(location, basename, metadata=None): (source)

Yield egg or source distribution objects based on basename

def distros_for_url(url, metadata=None): (source)

Yield egg or source distribution objects that might be found at a URL

def egg_info_for_url(url): (source)

Undocumented

@unique_values
def find_external_links(url, page): (source)

Find rel="homepage" and rel="download" links in `page`, yielding URLs

def fix_sf_url(url): (source)

Undocumented

def htmldecode(text): (source)

Decode HTML entities in the given text. >>> htmldecode( ... 'https://../package_name-0.1.2.tar.gz' ... '?tokena=A&tokenb=B">package_name-0.1.2.tar.gz') 'https://../package_name-0.1.2.tar.gz?tokena=A&tokenb=B">package_name-0.1.2.tar.gz'

def interpret_distro_name(location, basename, metadata, py_version=None, precedence=SOURCE_DIST, platform=None): (source)

Generate the interpretation of a source distro name Note: if `location` is a filesystem filename, you should call ``pkg_resources.normalize_path()`` on it before passing it to this routine!

def local_open(url): (source)

Read a local path, with special support for directories

def open_with_auth(url, opener=urllib.request.urlopen): (source)

Open a urllib2 request, handling HTTP authentication

def parse_bdist_wininst(name): (source)

Return (base,pyversion) or (None,None) for possible .exe name

def parse_requirement_arg(spec): (source)

Undocumented

def socket_timeout(timeout=15): (source)

Undocumented

def unique_values(func): (source)

Wrap a function returning an iterable such that the resulting iterable only ever yields unique items.

EGG_FRAGMENT = (source)

Undocumented

Value
re.compile(r'^egg=([-A-Za-z0-9_\.\+!]+)$')
EXTENSIONS = (source)

Undocumented

Value
""".tar.gz .tar.bz2 .tar .zip .tgz""".split()

Undocumented

Value
re.compile(r'href\s*=\s*[\'"]?([^\'"> ]+)',
           re.I)
PYPI_MD5 = (source)

Undocumented

Value
re.compile(r'<a href="([^"#]+)">([^<]+)</a>\n\s+\(<a (?:title="MD5 hash"\n\s+)hr
ef="[^\?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\)')

Regex for an HTML tag with 'rel="val"' attributes.

Value
re.compile(r'<([^>]*\srel\s{,10}=\s{,10}[\'"]?([^\'" >]+)[^>]*)>',
           re.I)
URL_SCHEME = (source)

Undocumented

Value
re.compile('([-+.a-z0-9]{2,}):', re.I).match
entity_sub = (source)

Undocumented

user_agent = (source)

Undocumented

def _encode_auth(auth): (source)

Encode auth from a URL suitable for an HTTP header. >>> str(_encode_auth('username%3Apassword')) 'dXNlcm5hbWU6cGFzc3dvcmQ=' Long auth strings should not cause a newline to be inserted. >>> long_auth = 'username:' + 'password'*10 >>> chr(10) in str(_encode_auth(long_auth)) False

def _splituser(host): (source)

splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.

_SOCKET_TIMEOUT: int = (source)

Undocumented

Value
15

Undocumented