Metadata-Version: 2.4
Name: hugging-bay
Version: 0.4.11
Summary: Open model files with recorded SHA-256 and licence labels; request what is missing.
Author: Hugging Bay
License: MIT
Project-URL: Homepage, https://huggingbay.xyz/?ref=pypi
Project-URL: Documentation, https://huggingbay.xyz/redoc
Project-URL: Repository, https://github.com/barneywohl/hugging-bay
Project-URL: Bug Tracker, https://github.com/barneywohl/hugging-bay/issues
Project-URL: API Reference, https://huggingbay.xyz/openapi.json
Keywords: hugging-bay,bay-run,models,safety,gguf,local-llm,huggingface-alternative,llm,provenance,openapi,mcp
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.24
Requires-Dist: cryptography>=41
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Requires-Dist: setuptools>=61; extra == "dev"
Requires-Dist: wheel>=0.43; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"

# Hugging Bay Python SDK

This source is the unpublished `hugging-bay` 0.4.11 candidate for Python 3.9
or newer. It restores `find_model(..., snapshot=...)`, retains hardware and
memory filters, and preserves the optional `oneAnswer` finder verdict.
Version 0.4.10 is already on PyPI. Pip installs the package's dependencies,
including `httpx` and `cryptography`.

Install in a virtual environment with
`python -m pip install 'hugging-bay==0.4.10'`. Follow the
[Python quickstart](https://huggingbay.xyz/python-sdk) for the tested install
and search example. Public catalog reads need no account or token.

## Read the catalog

Use `Client` for search, repository resolution, artifact records and download
plans. Search returns `rows`; use a returned row's `id` for later requests.
Keep `nextCursor` unchanged with the same query and filters for pagination.

A download plan describes file availability and recorded hashes. A catalog
match or a hosted file does not establish a complete model, hardware
compatibility, quality or permission to use it. Inspect the current plan and
license before downloading; compare downloaded bytes with the expected hash.

## Handle errors

For an unsuccessful HTTP response, the client raises `HuggingBayError` with
`status`, `body` and `retry_after_seconds`. Error codes and request IDs may
also be available. A network or timeout failure can raise an `httpx` exception
before an HTTP response exists.

Honor retry hints, limit total attempts and keep API errors separate from empty
results. For multiple workers, share a queue, request budget and cooldown.
Server extensions depend on the deployment; a package export does not prove
that its backing route is enabled.

## Reference

- [API reference](https://huggingbay.xyz/docs/api)
- [Agent cookbook: long-running and fleet recipes](https://huggingbay.xyz/docs/agent-cookbook)
- [Troubleshooting](https://huggingbay.xyz/docs/troubleshooting)
- [Keys and permissions](https://huggingbay.xyz/quickstart/keys)
- [MCP setup and package status](https://huggingbay.xyz/developers/mcp)

Bay Run is a separate service with separate credentials and limits. This catalog
quickstart does not call it. The hosted single-file SDK is also a separate
distribution; use the PyPI package for the guide linked above.

## License

MIT.
