This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
mandaye/mandaye/__init__.py

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()