INNER CODE UNIT · Python

health

tomascupr/sandstorm · src/sandstorm/main.py:292

async def health(deep: bool = Query(False, description="Run deep health checks")):
    result: dict = {"status": "ok", "version": __version__}
    if not deep:
        return result

    # Check configured API keys
    result["checks"] = {}
    result["checks"]["anthropic_api_key"] = bool(os.environ.get("ANTHROPIC_API_KEY"))
    result["checks"]["e2b_api_key"] = bool(os.environ.get("E2B_API_KEY"))

    # Check E2B API reachability
    try:
        import asyncio
        import urllib.request

        req = urllib.request.Request(
            "https://api.e2b.dev/health",
            method="GET",

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…