3 from sqlalchemy import Column
4 from sqlalchemy import Integer
5 from sqlalchemy import Unicode
7 from sqlalchemy.exc import IntegrityError
8 from sqlalchemy.ext.declarative import declarative_base
10 from sqlalchemy.orm import scoped_session
11 from sqlalchemy.orm import sessionmaker
14 DBSession = scoped_session(sessionmaker())
15 Base = declarative_base()
17 def initialize_sql(engine):
18 DBSession.configure(bind=engine)
19 Base.metadata.bind = engine
20 Base.metadata.create_all(engine)