Skip to main content

🚀 yyds-pip

yyds-pip 是一个极速、便捷、终端视觉体验极佳的 PyPI 镜像源命令行管理工具。它专门为解决中国大陆地区下载 Python 依赖包缓慢的问题而设计,提供比传统镜像配置工具更强大、更优雅的使用体验。


✨ 核心特性

  • 并发测速:采用 ThreadPoolExecutor 并发测试各大镜像源延迟,整体耗时受网络状况和 --timeout 设置控制。
  • 🔒 安全默认值:HTTPS 请求默认验证服务器证书,不会自动把 HTTPS 镜像加入 trusted-host
  • 🎮 键盘交互选择:支持在终端直接使用 上下方向键 (↑/↓) 选择镜像源,回车一键切换,极具人性化。
  • 全新取消选项:在选择菜单中添加了 ❌ 取消选择 (Cancel) 行,操作上更加方便直接,支持按 Enter 或 Esc/q 放弃配置变更退出。
  • 🎨 视觉观赏度高:使用 rich 库构建绚丽多彩的当前状态看板、加载动画,并在测速结果中以色阶标记延迟(绿/黄/红)。
  • 🔧 便捷的命令行
    • 支持 yyds-pipyyds_pip 两种拼写命令,完美兼容短横线与下划线拼写习惯。
    • 直接运行 yyds-pip先即时展示当前状态面板,同时在后台进行并发测速,测速完毕后无缝加载交互式菜单,操作极致流畅。
    • 支持 best 自动选择、test 列表测速、show 查看配置、reset 一键恢复官方源。

📦 支持的镜像源

别名 (Alias) 镜像源名称
aliyun 阿里云
tsinghua 清华大学
tencent 腾讯云
douban 豆瓣
huawei 华为云
ustc 中国科学技术大学
sjtu 上海交通大学
pypi PyPI 官方

🛠️ 安装方法

方式一:直接从 PyPI 安装(推荐)

pip install -U yyds-pip

方式二:本地源码安装

进入项目根目录,在终端中以可编辑(-e)模式安装:

pip install -e .

注:该工具要求 Python >= 3.7,依赖 clickrich 库。


📖 使用指南

注:以下指南中 yyds-pipyyds_pip 均等价生效。

1. 测速与交互式选择(推荐)

直接运行 yyds-pip

yyds-pip

系统将立即向您展示当前配置状态卡片,同时进行并发延迟测试,并随之载入交互式菜单。您只需使用 ↑/↓ 键 移动高亮选择项,按 Enter 键 确认切换,或者选择底部的 ❌ 取消选择 (Cancel) 行退出即可!

2. 自动切换到最快源

yyds-pip best

3. 查看当前配置

yyds-pip show

4. 列出所有镜像源

yyds-pip list

5. 测速并以表格输出

yyds-pip test

6. 手动设置镜像源

可以通过内置别名(例如 tsinghua)进行设置:

yyds-pip set tsinghua

或者输入自定义的 HTTPS 源 URL:

yyds-pip set https://mirrors.aliyun.com/pypi/simple/

HTTP 源会降低连接安全性,必须显式确认:

yyds-pip set --allow-insecure http://localhost:8080/simple/

修改配置的命令支持 --scope user|site|global,默认写入用户级配置。例如:

yyds-pip set --scope site tsinghua

7. 恢复官方源

yyds-pip reset

如果存在 PIP_INDEX_URL 环境变量,它仍会覆盖配置文件;工具会在修改后给出提示。

Download files

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

Source Distribution

yyds_pip-0.4.7.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

yyds_pip-0.4.7-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file yyds_pip-0.4.7.tar.gz.

File metadata

  • Download URL: yyds_pip-0.4.7.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for yyds_pip-0.4.7.tar.gz
Algorithm Hash digest
SHA256 793a87ff9a2ac0b26a2394648284c97377c4a74ee80bc6835435159e4b54762b
MD5 0592a098418618ef07d9b19df05a0220
BLAKE2b-256 3dab52e2573f370ee7e29fee7fe04c79120d3b952ea0f4f1c960f48428d15291

See more details on using hashes here.

File details

Details for the file yyds_pip-0.4.7-py3-none-any.whl.

File metadata

  • Download URL: yyds_pip-0.4.7-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for yyds_pip-0.4.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c753b4a7c69ece249795b52159a21fe85d369b8a348d1b94e2e8b8c8fe123846
MD5 413a1495e9a63c1cb02805a3e0ea144e
BLAKE2b-256 80a8348c00c67d6ffdca3a464ea81f29551667af3343fea6caa3391d937324d1

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.7 This release

2 files

0.4.6

2 files

0.4.5

2 files

0.4.4

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.1.9

2 files

0.1.6

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

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