Metadata-Version: 2.1
Name: qpip
Version: 0.1.0
Summary: A fast pip tool with domestic mirror sources
Author-email: jvy <jvy@qq.com>
License: MIT License
        
        Copyright (c) 2026 jvy
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/jvy/qpip
Project-URL: Repository, https://github.com/jvy/qpip
Project-URL: Issues, https://github.com/jvy/qpip/issues
Keywords: pip,mirror,cli,python-package
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

## qpip

`qpip` is a thin wrapper around `python -m pip` that can automatically use a faster mirror for package downloads.

### Features

- Keeps using the current Python interpreter instead of relying on a separate `pip` binary.
- Injects a mirror only for network-facing subcommands like `install`, `download`, and `wheel`.
- Preserves user intent when `--index-url`, `--extra-index-url`, `--find-links`, or `--no-index` is already provided.
- Supports both `qpip tsinghua install numpy` and `qpip --mirror douban install pandas`.
- Works with `python -m qpip` and provides a `--dry-run` mode for inspection.

### Installation

```bash
pip install qpip
```

For local development:

```bash
python -m build
pip install dist/qpip-0.1.0-py3-none-any.whl
```

### Usage

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

If you need to pass an option that starts with `-` directly to `pip`, place `--` before the pip arguments:

```bash
qpip -- --version
```

### Default mirror

`qpip` uses `ali` by default. You can override it with the `QPIP_DEFAULT_MIRROR` environment variable:

```bash
set QPIP_DEFAULT_MIRROR=tsinghua
qpip install httpx
```

### Supported mirrors

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

### Development

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