diff options
author | navanchauhan <navanchauhan@gmail.com> | 2022-05-22 11:42:00 -0600 |
---|---|---|
committer | navanchauhan <navanchauhan@gmail.com> | 2022-05-22 11:42:00 -0600 |
commit | 404c6fb1a3aa8e19db25a5c53098ce4f8a917fd7 (patch) | |
tree | 578b9b21384b889c37b7f9ab2268456e05da8a96 /database.py | |
parent | 801289d123b6e598110a5a1af96605fce9573f7c (diff) |
cleaned with black
Diffstat (limited to 'database.py')
-rw-r--r-- | database.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/database.py b/database.py index 369cf97..1a4bda0 100644 --- a/database.py +++ b/database.py @@ -5,7 +5,7 @@ from sqlalchemy import insert from sqlalchemy.orm import sessionmaker from sqlalchemy.exc import IntegrityError -#database_url = "sqlite:///jlm.db" +# database_url = "sqlite:///jlm.db" meta = MetaData() @@ -25,15 +25,17 @@ movies_table = Table( Column("votes", Integer), Column("comment_count", Integer), Column("tagline", String), - Column("embeddings", PickleType) - + Column("embeddings", PickleType), ) + def init_db_stuff(database_url: str): engine = create_engine(database_url) meta.create_all(engine) Session = sessionmaker(bind=engine) return engine, Session + + """ movie = { "title": movie["movie"]["title"], @@ -46,4 +48,4 @@ def init_db_stuff(database_url: str): "runtime": movie["movie"]["runtime"], "country": movie["movie"]["country"] } -"""
\ No newline at end of file +""" |