Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def init():
"""
setups our persistence for this module
:return:
"""
engine = create_engine(os.environ.get("TECHNICAL_HISTORY_DB", 'sqlite://'))
session = scoped_session(sessionmaker(bind=engine, autoflush=True, autocommit=True))
OHLCV.session = session
OHLCV.query = session.query_property()
_DECL_BASE.metadata.create_all(engine)