メモ

まるちぷるでーたべーす

engine1 = create_engine('postgres://db1')
engine2 = create_engine('postgres://db2')

Session = sessionmaker(twophase=True)

# bind User operations to engine 1, Account operations to engine 2
Session.configure(binds={User:engine1, Account:engine2})

これはステキだ。