+from invirt.config import structs as config
from models import *
+import sqlalchemy
-def connect(uri):
+def connect(uri = config.db.uri):
""" Connect to a given database URI"""
- meta.connect(uri)
+ engine = sqlalchemy.create_engine(uri)
+ meta.bind = engine
+ session.configure(bind=engine)