Full Web Apps with FastAPI Transcripts
Chapter: Storing data with SQLAlchemy
Lecture: Need to learn SQLAlchemy? See the appendix
0:00 When I introduced this chapter, I said,
0:01 you're familiar with this SQLAlchemy
0:04 API and we're going to start that way.
0:06 Well, what if you aren't familiar with it?
0:08 What if you need to learn SQLAlchemy?
0:10 Maybe you're brand new to databases.
0:12 Well, there's a couple of things you can do.
0:14 One, you can just sit back and let it wash over you and kind of
0:16 get an appreciation and some initial exposure to what we're doing.
0:20 Or if you want to make sure you dive in,
0:22 you wanna do a little extra work,
0:24 I'm going to actually put an appendix that you can go study first, before we jump
0:29 in to actually writing the code. If you look over on the Talk Python Training
0:33 site, we have a class called "Building Data-Driven Web Apps with Flask and
0:38 SQLAlchemy". In this course, we built PyPI from scratch
0:41 but way, way deeper into the web
0:44 design, the web development foundations across everything.
0:47 Remember, this is about teaching you how to do that kind of stuff with FastAPI,
0:50 not how to teach you how to do it from absolute no understanding,
0:54 which is kind of what this course does.
0:57 And if you look down here,
0:58 you can see we've got chapter 9 and 10, "Modeling data
1:02 with SQLAlchemy classes" and then doing basically queries,
1:05 inserts and updates with SQLAlchemy as chapter 10.
1:09 It's almost two hours of content,
1:11 I'm going to take those two chapters and put them into appendices at the end of
1:15 the course. If you're really wanting to go slow and take everything in and SQLAlchemy
1:22 this is your first exposure to it.
1:24 Then go ahead and watch those two appendices,
1:26 those two chapters. Not only
1:28 will they teach you SQLAlchemy in the context of web development,
1:31 they will teach you SQLAlchemy building PyPI.
1:34 So, in fact, the data model is identical.
1:37 So in this course we built pypi.org from scratch,
1:40 using much of the same constructs.
1:42 And over here, when we talk about SQLAlchemy,
1:44 we're talking about the same thing users,
1:46 packages, releases and so on.
1:47 So you'll get a really good foundation for what we're gonna do with
1:50 SQLAlchemy over here
1:52 if you'd like to spend an extra couple hours digging into the foundations.
1:56 If you're familiar with it, you probably don't need to do this,
1:58 but if your brand new, your time is probably well spent over here going through the
2:02 two appendices before we go further.