source: trunk/packages/sipb-xen-database/python/database/__init__.py @ 1027

Last change on this file since 1027 was 991, checked in by price, 16 years ago

more sqlalchemy-0.4 changes

File size: 262 bytes
RevLine 
[829]1from invirt.config import structs as config
[77]2from models import *
[946]3import sqlalchemy
[77]4
[829]5def connect(uri = config.db.uri):
[77]6    """ Connect to a given database URI"""
[991]7    engine = sqlalchemy.create_engine(uri)
8    meta.bind = engine
9    session.configure(bind=engine)
Note: See TracBrowser for help on using the repository browser.