Course Review: Modern APIs with FastAPI, MongoDB and Python
By EricMesa
- 4 minutes read - 827 wordsI’ve attended a few of Michael Kennedy’s Python courses over at TalkPython.fm. He’s a great instructor and he really knows his Python. (As well he should, as host of Talk Python and co-host of Python Bytes) His usual courses at Talk Python are pre-recorded and I believe this was Michael’s first time doing an online live class under the Talk Python banner. (Before the pandemic, I think Michael would conduct live, in-person classes for companies)
Michael configured the class to run MWF over 2 weeks. Each day had 2 hours of lecture and 2-4 hours of coursework (depending on how familiar you were with the material and/or how cooperative your software was). The class used the Maven platform to provide the forums and calendar for the class. If you’ve used something like Canvas or Blackboard, it’s like a simplified version of that. The live class portion shunted us off to the Zoom teleconferencing software we’ve all become familiar with thanks to COVID.
Even though most lecture days often went 15-20 minutes over time, I think Michael picked the perfect amount of time for lecture. Within reason, he would allow us to ask questions and go off on slight tangents. In my opinion, this allowed for slightly better learning because each of us in the cohort were able to ask for clarifications to see how what we were learning was relevant to our various work, side-hustle, and personal projects. I think this class has benefited A LOT from the COVID experience, because everyone had perfect teleconferencing etiquette. We were on Zoom for 12+ hours and only once did someone forget to turn off their mic when they were done talking. Everyone was either using the ability to blur the background or replace it with an image. For the most part no one spoke over anyone else and knew when to use chat vs interrupting. It worked just about as well as it would have worked in person.
Speaking of the cohort, I think this is going to be the most variable part of the class as Michael goes forward with new iterations. As with any class - out of 20ish participants, only about 6-8 or so of us were vocal participants. Out of those, there were folks with various levels of experience with FastAPI and MongoDB. So folks were able to support each other with questions both during class and on the site. If you end up in a cohort full of newbies or if you’re the only newbie among experts, it could be a less positive experience for you.
The coursework functioned well to reinforce what we had learned in class. Once we were a few days in, most of the coursework involved reimplementing what Michael had done live in class. I think, for a very short class like this one (as opposed to an undergraduate or graduate class), this works better than having us apply our knowledge to a variation on what we saw in class. While that solidifies the knowledge a little better (because it makes you think about why it’s the right answer), in a class that only meets 6 times and has limited office hours, I think it works a little better to just try and see if you retained the info enough to recreate the lecture’s work.
If you’re curious about FastAPI and NoSQL via MongoDB, I highly recommend this class. Let me provide a few caveats that I think will make the class work better for you if you’re considering it. You should have a relatively firm grasp of Python already. While Michael spends the first couple of lectures introducing Pydantic and FastAPI, if you don’t already have familiarity with them, I think things will be a lot harder as you start up the class. If you have similar experience - say with Flask or (to a lesser extent) Django, then I think you’ll have knowledge that’s close enough to the way that FastAPI works that you’ll be able to easily jump in. While it’s not required, I think you’ll get a lot more out of the class if you’re already working on (or in the planning phase for) a FastAPI project. This gives the content immediate applicability and allows you to start applying the knowledge outside the toy/demo project the class develops (an API-only version of PyPi). As I mentioned before, many of my classmates were using the knowledge they learned for their jobs or personal projects. I’ve been able to apply a bunch of what I learned to my big FastAPI project, the Civ VI Webhook. Moving things from a JSON file to MongoDB is really simplifying the logic in the project (even if I’ve had a few learning pains as I move beyond what we learned in the class).
You can sign up to be a part of the next cohort here.
Disclaimer: Michael offered a few scholarship positions for the class and I was a scholarship recipient.