Building Data-Driven Web Apps with Pyramid and SQLAlchemy Transcripts
Chapter: Using SQLAchemy
Lecture: Concept: Inserting data
0:00 We started off this chapter by demoing how to insert data. Let's actually summarize now here at the end. So again, we're going to create a session
0:09 which is the corresponding unit of work bit of syntax in SQLAlchemy. Then we're just going to allocate some objects
0:16 so here we're going to create a package and set its ID and its author maybe create some releases, set the release
0:24 not package value, other properties similarly release two, set its package. We're going to add the package, call commit
0:31 whoosh, all three of those things because of the relationships get inserted into the database. Super easy.