Skip to main content

A fast pip tool with domestic mirror sources

Project description

qpip

qpip 是一个对 python -m pip 的轻量封装,可以在安装 Python 包时自动使用更快的镜像源。

功能特性

  • 始终使用当前 Python 解释器调用 pip,避免直接依赖独立的 pip 可执行文件。
  • 仅在 installdownloadwheelindexsearch 这类需要联网的子命令上自动注入镜像源。
  • 如果用户已经显式传入 --index-url--extra-index-url--find-links--no-index,不会强行覆盖。
  • 同时支持 qpip tsinghua install numpyqpip --mirror douban install pandas 两种写法。
  • 支持 qpip i requests 这样的 pip install 简写。
  • 支持 python -m qpip 运行方式,并提供 --dry-run 用于预览最终命令。
  • 命令行帮助、错误提示和镜像列表输出均为中文。

安装

pip install qpip

本地开发安装示例:

python -m build
pip install dist/qpip-0.1.2-py3-none-any.whl

使用方法

qpip install requests
qpip i requests
qpip tsinghua install numpy
qpip tsinghua i numpy
qpip --mirror douban install pandas
qpip --dry-run install fastapi
qpip --list-mirrors
qpip --help
python -m qpip install rich

如果你要把以 - 开头的参数直接传给 pip,请在前面加上 --

qpip -- --version

默认镜像

qpip 默认使用 ali。如果你想修改默认镜像,可以设置环境变量 QPIP_DEFAULT_MIRROR

set QPIP_DEFAULT_MIRROR=tsinghua
qpip install httpx

支持的镜像源

  • ali: https://mirrors.aliyun.com/pypi/simple/
  • tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple/
  • douban: https://pypi.doubanio.com/simple/

开发

python -m unittest discover -s tests -v
python -m build

Project details


Download files

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

Source Distribution

qpip-0.1.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

qpip-0.1.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file qpip-0.1.3.tar.gz.

File metadata

  • Download URL: qpip-0.1.3.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for qpip-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1c05e91743475e8dd93c503760ac8a68a9567d96c0e378bbed9a9a0a4a05ab3a
MD5 4463abc3d4d028e12999a91d9bbef24b
BLAKE2b-256 771cc713cefa4f53e5cb3c577c7c95fb32a47f6891d0e527925d3e3a6f14be11

See more details on using hashes here.

File details

Details for the file qpip-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: qpip-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.10

File hashes

Hashes for qpip-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6677f4d591069fa2d18e44d71ddf0fe953f791ead3633058f096dd1c67d7c283
MD5 9b3d7288ae45ef6553b515485b8f77ce
BLAKE2b-256 bc192e8692172e71b0882dc71776bd6e5aab97ab8faab62233134cc89c08fe52

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