|
|
@ -1,3 +1,5 @@
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
import marshmallow
|
|
|
|
import marshmallow
|
|
|
|
import sqlalchemy
|
|
|
|
import sqlalchemy
|
|
|
|
import sqlalchemy.orm
|
|
|
|
import sqlalchemy.orm
|
|
|
@ -6,7 +8,9 @@ import sqlalchemy.ext.declarative
|
|
|
|
from datetime import datetime
|
|
|
|
from datetime import datetime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
engine = sqlalchemy.create_engine('sqlite:////tmp/quotes.db') # FIXME
|
|
|
|
DB_PATH = os.path.expandvars('$HOME/quotes/quotes.db')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
engine = sqlalchemy.create_engine(f'sqlite:///{DB_PATH}')
|
|
|
|
Session = sqlalchemy.orm.sessionmaker(bind=engine)
|
|
|
|
Session = sqlalchemy.orm.sessionmaker(bind=engine)
|
|
|
|
Base = sqlalchemy.ext.declarative.declarative_base()
|
|
|
|
Base = sqlalchemy.ext.declarative.declarative_base()
|
|
|
|
|
|
|
|
|
|
|
|