aux_backup / check_analysis_api.py
harvesthealth's picture
Upload folder using huggingface_hub
3d776bd verified
import os
import httpx
import asyncio
import json
async def check_analysis():
api_key = os.environ.get("ANALYSIS_API_KEY")
if not api_key:
print("ANALYSIS_API_KEY not set")
return
headers = {
"x-goog-api-key": api_key,
"Content-Type": "application/json"
}
url = "https://jules.googleapis.com/v1alpha/sources"
async with httpx.AsyncClient() as client:
try:
response = await client.get(url, headers=headers)
print(f"Status Code: {response.status_code}")
print(f"Response: {json.dumps(response.json(), indent=2)}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
asyncio.run(check_analysis())