| 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()) | |