A SQLAlchemy Session is the unit-of-work object used to connect ORM operations to a database and manage transactional changes. Create an engine and table metadata, bind a sessionmaker to the engine, then instantiate a session. section 23.4.1
Use the session to perform database work:
- Call session.commit() to save transactional changes. section 23.4.1
Insert and commit
After defining the people table and creating a session, build an insert object, execute it, and commit the change: session.execute(people_ins); session.commit(). Querying afterward returns the saved row.
