projects
/
invirt/packages/invirt-database.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b3dd61c2ec2994f6d26a47e8d48ac491504998e1
[invirt/packages/invirt-database.git]
/
python
/
database
/
__init__.py
1
from invirt.config import structs as config
2
from models import *
3
import sqlalchemy
4
5
def connect(uri = config.db.uri):
6
""" Connect to a given database URI"""
7
engine = sqlalchemy.create_engine(uri, pool_timeout=5)
8
meta.bind = engine
9
session.configure(bind=engine)