Download test_supabase_call.py from isold/MeloonTop: direct link, hf CLI and curl.
- Browser
- Download file 338 Bytes
-
https://huggingface.co/spaces/isold/MeloonTop/resolve/main/test_supabase_call.py
- Command line
-
hf download hf://spaces/isold/MeloonTop/test_supabase_call.py
-
curl -L -o test_supabase_call.py https://huggingface.co/spaces/isold/MeloonTop/resolve/main/test_supabase_call.py
338 Bytes
| import asyncio | |
| from app.database import supabase | |
| async def test_db(): | |
| try: | |
| res = supabase.table("dynamics").select("*", count="exact").execute() | |
| print(f"Success! Data: {res.data}, Count: {res.count}") | |
| except Exception as e: | |
| print(f"Exception caught: {type(e).__name__}: {str(e)}") | |
| asyncio.run(test_db()) | |