Skip to main content

Fast switching PyPi mirror image source

Project description

                                         _ __      _,.---._      .=-.-.
                                      .-`.' ,`.  ,-.' - ,  `.   /==/_ /
                                     /==/, -   \/==/ ,    -  \ |==|, |  
                                    |==| _ .=. |==| - .=.  ,  ||==|  |  
                                    |==| , '=',|==|  : ;=:  - ||==|- |  
                                    |==|-  '..'|==|,  '='  ,  ||==| ,|  
                                    |==|,  |    \==\ _   -    ;|==|- |  
                                    /==/ - |     '.='.  ,  ; -\/==/. /  
                                    `--`---'       `--`--'' `--`--`-`   

                                                    ---- by Hangfeng Yang
    ▌                                                                           j
    ▌                                                                           j
    ▌                                                                           j
    Γ           ▐███Γ        ▄██▓p                  ▄▄                          j
    Γ           ╫███─       ▄████                 └████   ▐██████████████████████
    Γ           ████       ▓███████████µ            ████  ╟████▀▀▀▀▀▀█████▀▀▀▀▀▀▐
    Γ           ████     ,█████▀▀▀▀████▀            ╙████ ████⌐      ████       j
    Γ       ██████████▌ ▄████▀    ████▀              ╟███▀████  ██████████████▄ j
    Γ       ██████████▄█████,,,,▄████▄                   ]████ ]████▀▀▀▀▀▀▀███▌ j
    Γ          ████    ╠████████████████▄       .▄██▌    ╟███▌ ╟███       j███▌ j
    Γ          ████    ╟███▀▀▀████▀▀▀███▌        ╙████   ████Γ ███████████████  j
    Γ         ▐███▌    ████   ███▌  ▐███▌         ╙███▌  ████  ███████████████  j
    Γ         ╟██████  ████  ▐███▌  ╟███           ╟███▌ ████  ███▌       ████  j
    Γ        ,████████ ███▌  ╟███   ████            █▀╙─▐███▌ ▐██████████████▌  j
    Γ     ▓████████▀└ ▐███⌐  ████   ███▌                ████⌐ ╫██████████████⌐  j
    Γ     ╙███████  ▐████████████████████⌐         ███▓ ████        ████        j
    Γ      └ ╟███▌  ╫████████████████████         ╟███▌▐███▌  ███▌ ▐███▌ ███µ   j
    Γ        ████⌐         ██████                 ████ ████  ▓███  ████⌐ ███▌   j
    Γ        ████        ╓███████▌               ████⌐▐████ ▐███▌  ████  ███▌   j
    Γ       ]████       ▓████ ╙███▌             ▄███▌ ████¬╓███▌  ]████  ████   j
    Γ   ,▄▄ ▐███▌    ,▓████▀   ╚████           ▐████ ▐███▌╔████   ╟███▌  ╟███   j
    Γ   ███▌████⌐ ╓▄█████▀      ╙████▓        ▄████ ]████Φ████▄▄█,████⌐  ▐███µ  j
    Γ   ╙██████▀  █████▀          ▀████▀     á████  ████Γ  └╙ ███████▀    ▀▀▀`  j
    Γ     ╙▀▀╙     ╙▀               ▀▀`       '╙▀   ╙▀▀▌       ╙▀█▀▀`           j
    Γ                                                                           j
    Γ                                                                           j
                                                    ---- by qsbye

huanyuan: a terminal tools for Python:globe_with_meridians:

由于国内通过pip下载python包的速度真的很慢,很容易因为超时而失败,而pqi可以把PyPi源迅速切换为国内源tuna, douban, aliyun, ustc从而大大加快python包的安装速度,提速效果见下图所示。huanyuan是对pqi的修改版本,添加类似`python -m HUANYUAN.huanyuan`的模块方式访问模块,解决某些情况下安装pqi后在命令行显示无此命令或者修改指定版本Python的下载源.

怎么使用(兼容py2/py3/linux/windows/MacOS)

1.安装

方法一(推荐)

>>> pip install -i https://pypi.org/simple huanyuan

方法二

>>> git clone https://gitee.com/qsbye/python-huanyuan.git
>>> python3 setup.py install

2. 命令行输入 huanyuan 回车

>>> huanyuan
Usage:
  huanyuan ls
  huanyuan use <name>
  huanyuan show
  huanyuan add <name> <url>
  huanyuan remove <name>
  huanyuan (-h | --help)
  huanyuan (-v | --version)
Options:
  -h --help        Show this screen.
  -v --version     Show version.
  • 列举所有支持的PyPi源
>>> huanyuan ls
  • 改变PyPi源
>>> huanyuan use <name>
或
>>> python -m HUANYUAN.huanyuan use douban

例子,比如运行huanyuan use tuna即把当前PyPi源改为清华的PyPi源

  • 显示当前PyPi源
>>> huanyuan show
  • 添加新的pip源(如添加USTC源)
>>> huanyuan add ustc https://mirrors.ustc.edu.cn/pypi/web/simple
  • 移除pip源(如官方PyPi源)
>>> huanyuan remove pypi

3. 升级到最新版huanyuan

>>> pip install --upgrade huanyuan

LICENSE

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

huanyuan-3.0.2-py3-none-any.whl (34.6 kB view details)

Uploaded Python 3

File details

Details for the file huanyuan-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: huanyuan-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 34.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for huanyuan-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 48374dbe205a0a82131ad453e1d2143a245c13e1b2c83c98934c04a955533cc8
MD5 d1153ab0d3391f5f8f1af8664c10cd10
BLAKE2b-256 aa573df98eca496dcf6c2ffa50effc0e11c2140ad9a9ba9634b113744288caf0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page