X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-database.git/blobdiff_plain/f67997422ee6290780b7cbb2fd50cd7fe3712221..95861a2faf8ff0edd2e834c70180cabf4b4a9359:/python/database/__init__.py diff --git a/python/database/__init__.py b/python/database/__init__.py index 88e5169..258c4d4 100644 --- a/python/database/__init__.py +++ b/python/database/__init__.py @@ -1,6 +1,9 @@ from invirt.config import structs as config from models import * +import sqlalchemy 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)