detect-installer
توضیحات
Detect how a Python package was installed and get the correct upgrade command
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | detect-installer-0.2.1 |
| نام | detect-installer |
| نسخه کتابخانه | 0.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Patrick Arminio |
| ایمیل نویسنده | Patrick Arminio <patrick.arminio@gmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/detect-installer/ |
| مجوز | - |
# detect-installer
Detect how a Python package was installed and get the correct upgrade command.
Supports pip, uv (project and pip modes), uv tool, pipx, Homebrew, Conda, and
Mamba.
## Installation
```bash
pip install detect-installer
```
## Usage
```python
from detect_installer import detect_installer
info = detect_installer("rich")
if info is None:
print("Package is not installed")
else:
print(info.installer) # e.g. Installer.PIP
print(info.upgrade_cmd) # e.g. "pip install -U rich"
```
## Vendoring
This library has zero dependencies and is published under the
[0BSD license](LICENSE), so you can copy
`src/detect_installer/_detect.py` directly into your project if you'd
prefer to avoid adding a dependency.
## License
[0BSD](LICENSE) - free to use, copy, modify, and distribute with or without
fee.
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl detect-installer-0.2.1:
pip install detect-installer.whl
نصب پکیج tar.gz detect-installer-0.2.1:
pip install detect-installer.tar.gz