On this page

Python SDK

Use the Hugging Bay catalog from Python.

Python 3.9+. Pip installs dependencies including httpx and cryptography. Public catalog reads need no token.

Install in a virtual environment. Remove any downloaded hugging_bay.py from your working directory so it cannot shadow the package. The legacy source archive requires the full package; it is not a standalone SDK or CLI. For terminal commands, see the CLI guide.

python -m pip install 'hugging-bay==0.4.12'
python -c 'from hugging_bay import Client; print(Client().search("rag embedding", limit=5))'

Library use

from hugging_bay import Client

with Client() as client:
    results = client.search("rag embedding", limit=5)
    for row in results["rows"]:
        print(row["id"])
    if results["rows"]:
        artifact_id = results["rows"][0]["id"]
        versions = client.artifact_versions(artifact_id)
        metadata = client.artifact(artifact_id)

Inspect version provenance

python -c 'from hugging_bay import Client; print(Client().artifact_versions("hf-model-sentence-transformers-all-minilm-l6-v2"))'

SDK README · Package source archive (not standalone)