File size: 741 Bytes
3d776bd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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())