A high-performance, user-friendly, and beautiful PyPI mirror source manager.
Project description
🚀 yyds-pip
yyds-pip 是一个极速、便捷、终端视觉体验极佳的 PyPI 镜像源命令行管理工具。它专门为解决中国大陆地区下载 Python 依赖包缓慢的问题而设计,提供比传统镜像配置工具更强大、更优雅的使用体验。
✨ 核心特性
- ⚡ 极致性能:采用多线程并发测试(
ThreadPoolExecutor)各大镜像源延迟,通常在 0.5秒内 完成所有源的测速。 - 🎮 键盘交互选择:支持在终端直接使用 上下方向键 (↑/↓) 选择镜像源,回车一键切换,极具人性化。
- 🎨 视觉观赏度高:使用
rich库构建绚丽多彩的命令行输出、加载动画,并在测速结果中以色阶标记延迟(绿/黄/红)。 - 🔧 便捷的命令行:
yyds-pip/yyds-pip select:进入极速测速与交互选择模式。yyds-pip best:一键自动选取最快的源应用配置。yyds-pip test:显示精美的镜像源测速排行榜(按延迟从小到大排序)。yyds-pip list:查看所有预设镜像源的名称及地址。yyds-pip show:清晰明了地展示当前 pip 配置的镜像源信息。yyds-pip set <alias|url>:手动设置指定别名(如tsinghua)或自定义 URL。yyds-pip reset:一键清除当前镜像源,恢复为 PyPI 官方源。
📦 支持的镜像源
| 别名 (Alias) | 镜像源名称 |
|---|---|
aliyun |
阿里云 |
tsinghua |
清华大学 |
tencent |
腾讯云 |
douban |
豆瓣 |
huawei |
华为云 |
ustc |
中国科学技术大学 |
sjtu |
上海交通大学 |
pypi |
PyPI 官方 |
🛠️ 安装方法
进入项目目录,在终端中以可编辑(-e)模式安装:
pip install -e .
注:该工具要求 Python >= 3.7,依赖 click 与 rich 库。
📖 使用指南
1. 测速与交互式选择(推荐)
直接运行 yyds-pip 命令:
yyds-pip
系统将自动对所有源进行并发测速,并在终端弹出带有高亮行和动态指针的菜单,您只需使用 ↑/↓ 键 移动,按 Enter 键 确认即可!
2. 自动切换到最快源
yyds-pip best
3. 查看当前配置
yyds-pip show
4. 列出所有镜像源
yyds-pip list
5. 测速并以表格输出
yyds-pip test
6. 手动设置镜像源
可以通过内置别名(例如 tsinghua)进行设置:
yyds-pip set tsinghua
或者输入自定义的 HTTP/HTTPS 源 URL:
yyds-pip set https://mirrors.aliyun.com/pypi/simple/
7. 恢复官方源
yyds-pip reset
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 Distribution
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 yyds_pip-0.1.1.tar.gz.
File metadata
- Download URL: yyds_pip-0.1.1.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a1b25f1214ce2cb5ce0c8a3fdc8625dcfec8dc128cb171b9849c386202e02c5
|
|
| MD5 |
40097df26bd124d7e124e1600565481d
|
|
| BLAKE2b-256 |
c9af4d97cccaa7c3eaf0e4671da6a8b949095e7e9e6735f7357a6d747115beb2
|
File details
Details for the file yyds_pip-0.1.1-py3-none-any.whl.
File metadata
- Download URL: yyds_pip-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96df6c21cd92fc1a7752c7146d09f4599b33cd431abc2eeb1f05144867e8d20c
|
|
| MD5 |
af2d7f685d4e6378889eefa774c65905
|
|
| BLAKE2b-256 |
68cbec5b4bb6986dd935dfa8cb206c918faf8e203639cbe7603bef070239270e
|