Fred808 commited on
Commit
3630edd
·
verified ·
1 Parent(s): 8326345

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -145,6 +145,18 @@ menu_items.extend(creole_drinks)
145
 
146
  SESSION_TIMEOUT = timedelta(minutes=5)
147
 
 
 
 
 
 
 
 
 
 
 
 
 
148
  async def populate_menu_items():
149
  async with async_session() as session:
150
  for item in menu_items:
 
145
 
146
  SESSION_TIMEOUT = timedelta(minutes=5)
147
 
148
+ import ssl
149
+ from sqlalchemy.ext.asyncio import create_async_engine
150
+
151
+ ssl_context = ssl.create_default_context()
152
+
153
+ engine = create_async_engine(
154
+ "postgresql+asyncpg://postgres:Lovyelias5584.@db.ditksqrdnuufseforpil.supabase.co:5432/postgres",
155
+ echo=True,
156
+ connect_args={"ssl": ssl_context}
157
+ )
158
+
159
+
160
  async def populate_menu_items():
161
  async with async_session() as session:
162
  for item in menu_items: