pinecone 2 records

This commit is contained in:
navanchauhan 2022-05-22 11:40:27 -06:00
parent 1848135c48
commit 04e733f168
1 changed files with 16 additions and 0 deletions

16
pc2rec.py Normal file
View File

@ -0,0 +1,16 @@
from database import *
from sqlalchemy.sql import select
database_url = "sqlite:///jlm.db"
engine, Session = init_db_stuff(database_url)
from sqlalchemy import func
movie_name = "Forrest Gump"
with engine.connect() as conn:
movie_deets = select(movies_table).filter(func.lower(movies_table.columns.title)==func.lower(movie_name))
result = conn.execute(movie_deets)
for row in result:
print(row)