model-downloader-util
Download model files from local paths, HTTP(S), S3 / MinIO / RustFS, GCS, or Git LFS.
Install
pip install modeldownloaderutil
Usage
from modeldownloaderutil import download_model, resolve_model, sources
path = download_model("s3://bucket/models/weights.onnx")
path = download_model("https://example.com/model.onnx")
path = download_model("git+https://github.com/org/repo.git#weights/a.onnx")
# Try sources in order (first success wins):
path = download_model(sources(
"rustfs://bucket/org/repo/weights/a.onnx",
"git+https://github.com/org/repo.git#weights/a.onnx",
))
# same as:
path = download_model(
"rustfs://bucket/org/repo/weights/a.onnx,git+https://github.com/org/repo.git#weights/a.onnx"
)
# Unpack zip archives and locate the weights file (.onnx, .pt, …):
path = resolve_model("s3://bucket/models/weights.onnx.zip")
Schemes
| Scheme | Example | Notes |
|---|---|---|
| Local | /path/to/model.onnx |
|
| HTTP(S) | https://host/model.onnx |
|
| S3 | s3://bucket/key |
MODEL_ACCESS_KEY / MODEL_SECRET_KEY |
| MinIO | minio://bucket/key |
MINIO_ENDPOINT |
| RustFS | rustfs://bucket/key |
RUSTFS_MODEL_ENDPOINT + access/secret |
| GCS | gs://bucket/object |
|
| Git LFS | git+https://host/org/repo.git#path |
Environment
| Variable | Purpose |
|---|---|
MODEL_CACHE_DIR |
Cache root |
MODEL_DOWNLOAD_PROGRESS |
0 to disable progress bars |
RUSTFS_MODEL_ENDPOINT |
Required for rustfs:// |
RUSTFS_MODEL_ACCESS_KEY / RUSTFS_MODEL_SECRET_KEY |
Or MODEL_ACCESS_KEY / MODEL_SECRET_KEY |
MINIO_ENDPOINT |
Required for minio:// |
Develop
make test
make build
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
modeldownloaderutil-1.2.0.tar.gz
(54.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file modeldownloaderutil-1.2.0.tar.gz.
File metadata
- Download URL: modeldownloaderutil-1.2.0.tar.gz
- Upload date:
- Size: 54.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0a09a41c3d2a822e119d2326e6a989ad968b6271198c3dd7e87c40cd4bfe241
|
|
| MD5 |
180521e93b7a0f29dbd049dc6657806f
|
|
| BLAKE2b-256 |
ff2e75ee042d1098b0e2b2a5f7ca8ed3df4431dbda25328d6ecd1d4c90a00d8c
|
File details
Details for the file modeldownloaderutil-1.2.0-py3-none-any.whl.
File metadata
- Download URL: modeldownloaderutil-1.2.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba4ed6422e95b41a700dbf489fb68da043f2bc7bcb9b7d14894c3b11b15da17f
|
|
| MD5 |
136bfe145ef5052215809134ac8ac0d3
|
|
| BLAKE2b-256 |
1dff4450ff5bab4f4264b88d4336695abf9b8c7be0145d99105c7621a7031155
|