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.1.tar.gz
(54.6 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.1.tar.gz.
File metadata
- Download URL: modeldownloaderutil-1.2.1.tar.gz
- Upload date:
- Size: 54.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7cbd60c72e3543651c174e6542a3c115c362703aaae692197b47a986621e764
|
|
| MD5 |
5610c5982e1fa485d0fc20e30be6acc8
|
|
| BLAKE2b-256 |
3858cf76acf78f1da424b3d205db4a4daf3e3c50b80a368dbf26e5fae022453e
|
File details
Details for the file modeldownloaderutil-1.2.1-py3-none-any.whl.
File metadata
- Download URL: modeldownloaderutil-1.2.1-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e362097ca325afcffb07db2bad6f431ed052f890787fcda585bdac784c53b51d
|
|
| MD5 |
5120a77eb0dc1610674f2980dffb210d
|
|
| BLAKE2b-256 |
28fb86fc690e4879a0874a784428851bb4a80b7832280583a11194a445d07086
|