import os import random from supabase import create_client, Client from dotenv import load_dotenv load_dotenv() url: str = os.environ.get("SUPABASE_URL") key: str = os.environ.get("SUPABASE_KEY") supabase: Client = create_client(url, key) def getAllStories(): response = supabase.table("existing_stories").select("*").execute() stories = response.data # return stories return random.sample(stories, len(stories))