Spaces:
Paused
Paused
Download test_db.py from Fred808/Desk-Back2: direct link, hf CLI and curl.
- Browser
- Download file 477 Bytes
-
https://huggingface.co/spaces/Fred808/Desk-Back2/resolve/main/test_db.py
- Command line
-
hf download hf://spaces/Fred808/Desk-Back2/test_db.py
-
curl -L -o test_db.py https://huggingface.co/spaces/Fred808/Desk-Back2/resolve/main/test_db.py
477 Bytes
| import psycopg2 | |
| import traceback | |
| try: | |
| print("Attempting database connection...") | |
| conn = psycopg2.connect( | |
| "dbname=postgres user=postgres password=Lovyelias5584. " | |
| "host=juycnkjuzylnbruwaqmp.supabase.co port=5432 " | |
| "sslmode=require" | |
| ) | |
| print("Connection successful!") | |
| conn.close() | |
| except Exception as e: | |
| print(f"Connection failed!") | |
| print(f"Error: {str(e)}") | |
| print("\nTraceback:") | |
| traceback.print_exc() |