Skip to main content

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)

Uploaded Source

Built Distribution

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

modeldownloaderutil-1.2.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

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

Hashes for modeldownloaderutil-1.2.1.tar.gz
Algorithm Hash digest
SHA256 c7cbd60c72e3543651c174e6542a3c115c362703aaae692197b47a986621e764
MD5 5610c5982e1fa485d0fc20e30be6acc8
BLAKE2b-256 3858cf76acf78f1da424b3d205db4a4daf3e3c50b80a368dbf26e5fae022453e

See more details on using hashes here.

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

Hashes for modeldownloaderutil-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e362097ca325afcffb07db2bad6f431ed052f890787fcda585bdac784c53b51d
MD5 5120a77eb0dc1610674f2980dffb210d
BLAKE2b-256 28fb86fc690e4879a0874a784428851bb4a80b7832280583a11194a445d07086

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.2.1 This release

2 files

1.2.0

2 files

1.0.10

2 files

1.0.8

2 files

1.0.7

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page