# Hugging Bay Python SDK

Use Python 3.9 or newer. Install the supported published package in a virtual
environment; pip installs its dependencies, including httpx and cryptography:

```sh
python -m pip install 'hugging-bay==0.4.12'
```

```python
from hugging_bay import Client

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

Public catalog reads need no account or token. Search can return no rows.
The page at https://huggingbay.xyz/python-sdk uses this package and public API.
For terminal commands, see https://huggingbay.xyz/developers/cli.

## Legacy source URL

`/sdk/hugging_bay.py` is an archive of a package module, not a standalone SDK
or CLI. It requires the full package, its relative modules and dependencies.
Do not save it as `hugging_bay.py` in your working directory: that file shadows
the installed package. Remove any previously downloaded copy before using pip.
The former `HuggingBayClient` import and `python hugging_bay.py search` / `versions`
commands are retired. Use `Client` and its methods as shown above.

The release manifest distinguishes the published package version from the
bundled source version and hashes the archived bytes. Those hashes do not make
the archived module an installable distribution.
