Skip to main content

bedhost

Code style: black Github badge

bedhost is a Python FastAPI module for the API that powers BEDbase. It needs a path to the bedbase configuration file, which can be provided either via -c/--config argument or read from $BEDBASE_CONFIG environment variable.


Developer quick-start

source environment/production.env
BEDBASE_CONFIG=deployment/config/api.bedbase.org.yaml uvicorn bedhost.main:app --reload

Embeddings

Search, /v1/bed/embed, and /v1/bed/umap need embedding models. By default bbconf loads them all in-process, which needs uv pip install -e ".[local]" --torch-backend cpu. The production configs instead set bbconf's embedding_server: block (see the bbconf README), so the two text models (dense and sparse) come from embedding servers and are not loaded by bedhost. The region model (path.region2vec) still runs in-process, so the Docker image keeps CPU-only torch. The servers come from these environment variables, which production reads from AWS SSM:

Variable Config key
EMBEDDING_DENSE_URL embedding_server.text_url
EMBEDDING_SPARSE_URL embedding_server.sparse_url
EMBEDDING_API_KEY embedding_server.api_key

To move the region model to a server too, add embedding_server.region_url. For local runs, source environment/production.env sets all three from the lab's pass store.

If a server is down, bedhost still starts and the routes that need it return 503.

UI development:

export VITE_API_HOST=http://localhost:8000

Testing

Black-box compliance tests (against any deployment):

pytest tests/api/ --api_root=https://api.bedbase.org

Integration tests (ephemeral Postgres + Qdrant + in-process TestClient, ~30s):

./tests/scripts/test-integration.sh

Manual service control:

./tests/scripts/services.sh start
RUN_INTEGRATION_TESTS=true pytest tests/integration/ tests/api/
./tests/scripts/services.sh stop

Integration tests require network access on first boot (bbconf downloads a licenses CSV from GitHub and may pull HuggingFace models unless BEDHOST_INIT_ML=false is set; test-integration.sh sets it). BEDHOST_LOG_LEVEL (default INFO) sets the log level for bedhost, bbconf, and geniml.

Metadata

Release files for bedhost 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bedhost 0.16.0
File Size Uploaded Provenance Actions
bedhost-0.16.0.tar.gz 567.2 kB With provenance Details for bedhost-0.16.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bedhost 0.16.0
File Interpreter ABI Platform Actions
bedhost-0.16.0-py3-none-any.whl Python 3 none any Details for bedhost-0.16.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / bedhost-0.16.0.tar.gz

Download URL bedhost-0.16.0.tar.gz
Size 567.2 kB
Tags Source
SHA-256 checksum
How to use checksums
84c9dab7ca01ed34a51869dca49a32ae2e798e2ef00f22a444a96d69c7f22049
BLAKE2b-256 checksum
How to use checksums
3df5804c17dda0c2457b5f8f020466dfc12732ddd021432b404fdf84ff182e88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Release files / bedhost-0.16.0-py3-none-any.whl

Download URL bedhost-0.16.0-py3-none-any.whl
Size 528.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b3932fc7c62c800f8fa89b78b918fb6677db60e891a0d21fc78891a8379a37d
BLAKE2b-256 checksum
How to use checksums
3ce6a89f4efc04a56cc1e47b8d4e21ad497e66821a2070ec2caf6cc4748f565e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

Security for bedhost 0.16.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for bedhost-0.16.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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