BakoAI / scripts /setup_storage.py
Okidi Norbert
Deployment fix: clean backend only
c6abe34
import asyncio
import os
from app.services.supabase_client import get_supabase_service
async def main():
print("πŸš€ Initializing Supabase Storage for Basketball Analysis...")
supabase = get_supabase_service()
if not supabase.is_connected:
print("❌ Supabase is not connected. Please check your .env file.")
return
# Ensure match-stats bucket exists
print("πŸ’Ž Ensuring 'match-stats' bucket exists...")
success = await supabase.ensure_bucket("match-stats", public=True)
if success:
print("βœ… Storage bucket 'match-stats' is ready!")
else:
print("❌ Failed to create/verify 'match-stats' bucket.")
print("πŸ‘‰ Please create it manually in the Supabase Dashboard -> Storage.")
if __name__ == "__main__":
asyncio.run(main())