Simple Python FastAPI service for querying CURIE metadata from a Dbssert DuckDB file.
This repository complements Dbssert and is part of the broader Tablassert ecosystem.
Set database path (required)
export DBSSERT_PATH=/path/to/dbssert.duckdbInstall dependencies (Nix shell)
nix developRun server
serve-apiServer starts on port 8052.
Health check endpoint:
GET /health
Returns plain text ok.
Entity lookup endpoint:
GET /curies-with-ner?entity=<text>
Returns JSON (application/json) as a list of records, including:
CURIEPREFERRED_NAMESYNONYMCATEGORY_NAMETAXON_ID
Canonical CURIE lookup endpoint:
GET /cannoical-curie-information?curie=<CURIE>
Returns JSON (application/json) as a list of records, including:
CURIEPREFERRED_NAMECATEGORY_NAMETAXON_ID
Single-file implementation in lib/dbssert_api/api.py:
- FastAPI app (
APP) - Declares all HTTP routes. - DuckDB query handlers - Open
DBSSERT_PATHin read-only mode and query CURIE metadata. serve_api()- Starts Uvicorn on0.0.0.0:8052.
Enter development shell:
nix developRun server locally:
serve-api