def copy_table(src_session, src_class, dst_session, dst_class):
    r = src_session.query(src_class).all()
for i in r:
    j = dst_class()
[setattr(j, col.name, getattr(i, col.name)) for col in i.__table__.columns]
dst_session.add(j)
se1 = db1.Session()
se2 = db2.Session()
copy_table(se1, db1.Book, se2, db2.Book)
se2.commit()
SqlAlchemy: export table to new database