一款轻量级的 Python 工具,用于高效测试多个镜像源的连接速度,帮助用户选择最优的镜像源以提高包管理效率。
Project description
pip-fc
pip-fc 全称是:pip fast check
pip-fc 是一个轻量级的 Python 工具,旨在测试多个镜像源的连接速度,并帮助用户选择最快的镜像源进行软件包安装。支持 Python 2.7 和 3.x 版本,能够自动根据环境选择适合的并发模式(asyncio 或 threading)。
功能
- 测试多个镜像源的连接速度。
- 自动选择连接速度最快的镜像源。
- 支持 Python 2.7 和 3.x 版本。
- 使用异步(
asyncio)或线程池(threading)来提高测试效率。 - 简单易用的命令行界面。
安装
使用 pip 安装:
pip install pip-fc
使用方法
通过运行以下命令启动:
pip-fc 或者 python -m pip-fc
此命令将会测试预设的镜像源,并显示连接速度最快的镜像源。你也可以自定义镜像源进行测试。
设置全局镜像源
如果你希望将测试中找到的最快镜像源设置为全局 pip 镜像源,可以在运行完成后输入 y 来确认:
Do you want to set the fastest mirror as the global pip mirror? (y/n): y
此操作将更新 pip 的配置文件,设置全局镜像源和回退镜像源。
依赖
pip:用于安装和管理 Python 包。futures:仅在 Python 2.7 环境下需要,安装时自动处理。
示例输出
Detected Python Version: 3.8.5 (asyncio)
--- Starting connection speed test using asyncio mode ---
Successfully tested 6 mirrors.
Fastest Mirror: https://pypi.tuna.tsinghua.edu.cn/simple/
Latency: 50.12345 ms
--- All Successful Connection Results (URL, Latency in ms) ---
https://pypi.tuna.tsinghua.edu.cn/simple/: 50.12345 ms
https://mirrors.aliyun.com/pypi/simple/: 65.67890 ms
...
贡献
欢迎提出问题、提交 bug 或者贡献代码。如果你有任何问题,或者希望添加新特性,请提交 issue。
许可
该项目采用 MIT 许可证,详情请见 LICENSE 文件。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pip_fc-0.1.11.tar.gz.
File metadata
- Download URL: pip_fc-0.1.11.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d70e4380d4595a700aa279189a412983a18bf5e6fca85494ca46af9b3a1c3fa8
|
|
| MD5 |
82c9e601e40774c14d8615af1d4d5091
|
|
| BLAKE2b-256 |
1e860f6591f6bd8d3b1242042c0c89bedef247479fcd497353fc0fe1f39d8ac8
|
File details
Details for the file pip_fc-0.1.11-py3-none-any.whl.
File metadata
- Download URL: pip_fc-0.1.11-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e442af3dfe4047b54589fc79c8772fa7acb7ecefd0b7f5515e20d250f69e191
|
|
| MD5 |
9e59f62948f9eaacaec61e774c82bc13
|
|
| BLAKE2b-256 |
cf6ceb34a6d01958b19ec1b05c17d9cc2a15d6764fb401cfaa3859ca0db0e59c
|
File details
Details for the file pip_fc-0.1.11-py2-none-any.whl.
File metadata
- Download URL: pip_fc-0.1.11-py2-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fecd159272b700b2e33ac0614e5c0bc303ba310124ee757631920a6c63890213
|
|
| MD5 |
8f9b2fbc397113e258f382a33aa51875
|
|
| BLAKE2b-256 |
f2fcedc6e26c01b784d578eb376501998ebc197558b257069c18d70b78abff92
|