Runtime Provisioner
运行时依赖自动下载器 - 一个用于自动下载和管理运行时依赖的Python库。
特性
- 🚀 自动下载: 导入时自动下载配置的依赖程序
- 🌍 跨平台支持: 支持 Windows、Linux、macOS
- 📦 智能缓存: 避免重复下载,支持版本管理
- 🔐 安全可靠: 解决常见的403错误,支持自定义请求头
- 📝 简单易用: 提供简洁的API接口
安装
pip install runtime-provisioner
快速开始
基本用法
import runtime_provisioner
# 自动下载并获取Chrome 109
chrome_exe = runtime_provisioner.get_chrome_109_exe()
print(f"Chrome路径: {chrome_exe}")
使用说明
这个库目前主要用于自动下载Chrome 109浏览器:
from runtime_provisioner import get_chrome_109_exe, Config
# 下载Chrome 109到默认位置
chrome_path = get_chrome_109_exe()
# 查看下载目录
print(f"下载目录: {Config.RUNTIME_PROVISION_DIR}")
配置
默认下载到用户目录下的 runtime_provisioner 文件夹:
~/runtime_provisioner/
├── Chrome109.zip # 下载的压缩包
└── chrome.exe # 解压后的可执行文件
技术特点
- 使用
wget库进行文件下载 - 自动设置User-Agent避免403错误
- 支持ZIP文件自动解压
- 跨平台路径处理
常见问题
Q: 下载失败怎么办?
A: 库已内置了User-Agent设置来避免403错误。如果仍有问题,请检查网络连接。
Q: 如何清理下载的文件?
A: 删除 ~/runtime_provisioner 目录即可。
Q: 支持其他程序下载吗?
A: 目前专注于Chrome 109,后续版本会支持更多程序。
许可证
MIT License
支持的平台
- ✅ Windows
- ✅ Linux
- ✅ macOS
更新日志
1.0.0
- 初始版本
- 支持Chrome 109自动下载
- 解决wget 403错误问题
Metadata
Release files for runtime-provisioner 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| runtime_provisioner-1.0.1.tar.gz | 5.9 kB | Without provenance | Details for runtime_provisioner-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| runtime_provisioner-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for runtime_provisioner-1.0.1-py3-none-any.whl |
Total release size: 10.6 kB
Release files / runtime_provisioner-1.0.1.tar.gz
| Download URL | runtime_provisioner-1.0.1.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0daf99249005e808f5dafe519c118a20cf2ddc6f5ee30aaf7ef4fd337b852985
|
|
BLAKE2b-256 checksum How to use checksums |
493c5408322fc7641f22ee3922f2c7d9c5318173b37c0fcc84e0cda5533f9664
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / runtime_provisioner-1.0.1-py3-none-any.whl
| Download URL | runtime_provisioner-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f81a9fc251157e3a4f5b662b78c0c6354ba12c1d45a3e95dced1c0ce1f1f129
|
|
BLAKE2b-256 checksum How to use checksums |
b8985449ac969dff2dcb3d85b8663016b5382018f62e7e720d8382d1b50e45c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for runtime-provisioner 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.