Spaces:
Paused
Paused
File size: 729 Bytes
7ea960f 1d5753d 7ea960f 1d5753d 7ea960f | 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_jules():
api_key = os.environ.get("JULES_API_KEY")
if not api_key:
print("JULES_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_jules())
|