Metadata-Version: 2.1
Name: huanyuan
Version: 3.0.2
Summary: Fast switching PyPi mirror image source
Home-page: https://gitee.com/qsbye/python-huanyuan
Author: Original:HangfengYang,Edited by qsbye
Author-email: yhf5fhy@gmail.com,2557877116@qq.com
License: MIT
Keywords: python、PyPi source、terminal
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: docopt

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

                                                    ---- 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
```
# <p align="center">huanyuan: a terminal tools for Python:globe_with_meridians:</p>

<p align="center">
    <a href="https://github.com/yhangf/PyQuickInstall/blob/master/LICENSE">
        <!--<img src="picture/flat.svg">-->
        </a>
    <a href="https://pypi.python.org/pypi/pqi">
        <img src="./picture/pqi.svg">
        </a>
    <a href="https://github.com/python/cpython">
        <img src="./picture/language-python-ff69b4.svg">
        </a>
    <a href="https://github.com/yhangf/PyQuickInstall">
    <img src="./picture/star.svg">
        </a>
    <a href="https://github.com/yhangf/PyQuickInstall">
    <img src="./picture/fork.svg">
        </a>
</p>
由于国内通过pip下载python包的速度真的很慢，很容易因为超时而失败，而pqi可以把PyPi源迅速切换为国内源tuna, douban, aliyun, ustc从而大大加快python包的安装速度，提速效果见下图所示。huanyuan是对pqi的修改版本,添加类似`python -m HUANYUAN.huanyuan`的模块方式访问模块,解决某些情况下安装pqi后在命令行显示无此命令或者修改指定版本Python的下载源.

![](./picture/db.png)

## 怎么使用(兼容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](./LICENSE)
