from pip._vendor.six.moves.urllib import parse as urllib_parse class Index(object): def __init__(self, url): self.url = url self.netloc = urllib_parse.urlsplit(url).netloc self.simple_url = self.url_to_path('simple') self.pypi_url = self.url_to_path('pypi') self.pip_json_url = self.url_to_path('pypi/pip/json') def url_to_path(self, path): return urllib_parse.urljoin(self.url, path) PyPI = Index('https://pypi.python.org/')
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__init__.py | File | 71 B | 0644 |
|
__init__.pyc | File | 260 B | 0644 |
|
__init__.pyo | File | 260 B | 0644 |
|
index.py | File | 487 B | 0644 |
|
index.pyc | File | 1.04 KB | 0644 |
|
index.pyo | File | 1.04 KB | 0644 |
|