Skip to main content

运行时依赖自动下载器 - 自动下载和管理运行时依赖

Project description

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错误问题

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

runtime_provisioner-1.0.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

runtime_provisioner-1.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file runtime_provisioner-1.0.1.tar.gz.

File metadata

  • Download URL: runtime_provisioner-1.0.1.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for runtime_provisioner-1.0.1.tar.gz
Algorithm Hash digest
SHA256 0daf99249005e808f5dafe519c118a20cf2ddc6f5ee30aaf7ef4fd337b852985
MD5 68ca6669f1429badea7ca1aab23d63a6
BLAKE2b-256 493c5408322fc7641f22ee3922f2c7d9c5318173b37c0fcc84e0cda5533f9664

See more details on using hashes here.

File details

Details for the file runtime_provisioner-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for runtime_provisioner-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f81a9fc251157e3a4f5b662b78c0c6354ba12c1d45a3e95dced1c0ce1f1f129
MD5 ffaf5a6edbdea6d802d76aa30c8bb2d5
BLAKE2b-256 b8985449ac969dff2dcb3d85b8663016b5382018f62e7e720d8382d1b50e45c8

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