File size: 433 Bytes
7c9530c c1f566c 7c9530c c1f566c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
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))
|