Spaces:
Sleeping
Sleeping
| import os | |
| from supabase import create_client | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| url = os.environ.get("SUPABASE_URL") | |
| key = os.environ.get("SUPABASE_SERVICE_ROLE_KEY") | |
| supabase = create_client(url, key) | |
| try: | |
| # Get one profile | |
| p_res = supabase.table("profiles").select("id").limit(1).execute() | |
| # Get one job | |
| j_res = supabase.table("jobs").select("id").limit(1).execute() | |
| if p_res.data and j_res.data: | |
| print(f"CANDIDATE_ID={p_res.data[0]['id']}") | |
| print(f"JOB_ID={j_res.data[0]['id']}") | |
| except Exception as e: | |
| print(f"Error: {e}") | |