From 04e733f16889494d23cf3fedaf9f281ddc057fff Mon Sep 17 00:00:00 2001 From: navanchauhan Date: Sun, 22 May 2022 11:40:27 -0600 Subject: pinecone 2 records --- pc2rec.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 pc2rec.py (limited to 'pc2rec.py') diff --git a/pc2rec.py b/pc2rec.py new file mode 100644 index 0000000..d427dad --- /dev/null +++ b/pc2rec.py @@ -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) \ No newline at end of file -- cgit v1.2.3