diff options
Diffstat (limited to 'pc2rec.py')
-rw-r--r-- | pc2rec.py | 16 |
1 files changed, 16 insertions, 0 deletions
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 |