Documentation Index
Fetch the complete documentation index at: https://docs.omophub.com/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Installation
Quick Start
import omophub
client = omophub.OMOPHub(api_key="oh_xxxxxxxxx")
# Get a concept
concept = client.concepts.get(201826)
print(concept["concept_name"]) # "Type 2 diabetes mellitus"
# Search concepts
results = client.search.basic("diabetes", page_size=5)
for concept in results["concepts"]:
print(f"{concept['concept_id']}: {concept['concept_name']}")
Async Usage
import omophub
import asyncio
async def main():
async with omophub.AsyncOMOPHub(api_key="oh_xxx") as client:
concept = await client.concepts.get(201826)
print(concept["concept_name"])
asyncio.run(main())
Configuration
client = omophub.OMOPHub(
api_key="oh_xxx",
timeout=30.0,
max_retries=3,
vocab_version="2025.1",
)
You can also set your API key via environment variable:
export OMOPHUB_API_KEY=oh_xxxxxxxxx
# API key is read from environment
client = omophub.OMOPHub()
Next Steps
Concepts
Get, batch, and explore concepts
Search
Search and autocomplete
Mappings
Map between vocabularies
Error Handling
Handle API errors gracefully