Here is my code:

from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker,scoped_session
from sqlalchemy.schema import MetaData

engine = create_engine(db_url, echo=engine_echo,pool_recycle=300)
session = scoped_session(sessionmaker(bind=engine))

So, for code blocks that need db operation, they all refer to the above 
session to do select, update , insert.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to