When using biolm-hub gateways, the SDK can
discover models from a hub’s OpenAPI spec and persist the gateway URL in
~/.biolm/config.yaml.
CLI setup
bash
# In biolm-hub repo: bh serve
biolm hub set http://127.0.0.1:8000
biolm model list
SDK modules
biolm.hub.config— read/writehub_api_urlin~/.biolm/config.yamlbiolm.hub.discovery— list models from hub OpenAPIbiolm.hub.catalog— bundled catalog helpers for hub model metadata
Example (discover models from a running hub):
python
from biolm.hub.discovery import list_models_from_openapi
models = list_models_from_openapi("http://127.0.0.1:8000/api/v1")
for m in models:
print(m["model_slug"], m["actions"])
API
- biolm.hub.discovery.list_models_from_openapi(base_url: str, *, client: Client | None = None) → List[Dict[str, Any]]
Fetch model slugs and actions from hub OpenAPI.
See also
biolm hub — CLI hub commands
biolm.hub package — full hub module reference