File size: 468 Bytes
78f4a71 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# mcp/who.py
"""
WHO Global Health Observatory (GHO) OData API helper.
Example: fetch essential medicines list or Covid stats.
"""
import httpx
from typing import Dict, List
BASE = "https://ghoapi.azureedge.net/api"
async def list_essential_medicines() -> List[Dict]:
url = f"{BASE}/EML"
async with httpx.AsyncClient(timeout=20) as client:
r = await client.get(url)
r.raise_for_status()
return r.json()["value"] # list of medicines
|