chpip
A tool to manage the base URL of the Python package index.
Installation
$ pip install chpip
Usage
Set pip index URL
Set the base URL of the Python package index with name.
$ chpip set -n ustc -i https://mirrors.ustc.edu.cn/pypi/web/simple
For more information about the options, please refer to the chpip set
command.
$ chpip set --help
Usage: chpip set [OPTIONS]
Options:
-n, --name TEXT Name of the Python package index. [required]
-i, --index-url TEXT Base URL of the Python Package Index. This should
point to a repository compliant with PEP 503 (the
simple repository API) or a local directory laid out
in the same format. [required]
--help Show this message and exit.
Change pip index URL
Change the base URL of the Python package index without name which means switching between the two indexes in turn.
$ chpip
Change Python package index to `ustc` successful.
$ chpip
Change Python package index to `default` successful.
Change the base URL of the Python package index with name.
$ chpip -n ustc
Change Python package index to `ustc` successful.
Show pip index URLs
Show all base URLs of the Python package index. Current index is marked with *
.
$ chpip show
default (https://pypi.org/simple)
* ustc (https://mirrors.ustc.edu.cn/pypi/web/simple)