16 lines
350 B
Python
16 lines
350 B
Python
VERSION=0.1
|
|
|
|
from sqlalchemy import create_engine
|
|
from sqlalchemy.orm import sessionmaker
|
|
|
|
from mandaye.config import db_url
|
|
|
|
# an Engine, which the Session will use for connection
|
|
# resources
|
|
sql_engine = create_engine(db_url)
|
|
# create a configured "Session" class
|
|
Session = sessionmaker(bind=sql_engine)
|
|
# create a Session
|
|
sql_session = Session()
|
|
|