Skip to content
Myr

update import of declarative_base from SQLAlchemy

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by mohammad m. moniri · committed by David Lord · parent 8e33b7b · Browse files · 1 file+1 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−2 removed

  • other:+1 added−2 removed

1 file+1 added−2 removed

modified:docs/patterns/sqlalchemy.rst+1 added-2 removed
32 unmodified lines
3334Here's the example :file:`database.py` module for your application::3536 from sqlalchemy import create_engine37 from sqlalchemy.orm import scoped_session, sessionmaker38 from sqlalchemy.ext.declarative import declarative_base37 from sqlalchemy.orm import scoped_session, sessionmaker, declarative_base3839 engine = create_engine('sqlite:////tmp/test.db')40 db_session = scoped_session(sessionmaker(autocommit=False,41 autoflush=False,
173 unmodified lines