WEEK 12: APIs & the Cheesecake Factory
Learning Python feels like the Cheesecake Factory menu.
Every week, I make a visual map of my Python learning journey — I share what I learn, how I learned it, and how you can too.
Learning Python feels like the Cheesecake Factory menu.
The Cheesecake Factory is notorious for it’s 21-page menu offering over 250 dishes, from a Classic Burger to Korean BBQ Chicken to TexMex Spring Rolls. The options are both endless and overwhelming.
And that’s kind of what Python feels like.
After learning the basics of Python, I finally reached a point where I could decide what to learn next. But there was a problem. The beauty—and curse—of Python is that it can do almost anything. Choosing a path felt like staring at a 21-page menu where the words data science✨, artificial intelligence✨, and machine learning✨ are bolded, highlighted, and recommended by every career expert out there.
Despite the well-intentioned advice to take the data science path, I chose to explore a path I knew I wouldn’t regret — web development. Starting off with learning about APIs.
🔨 WHAT I LEARNED
You probably use APIs every single week. API, which stands for Application Programming Interface, is a way for applications to send and receive information between one another.
✨ Analogy time: Whenever you go to a sit-down restaurant, you give your meal request to the waiter, the waiter takes your order back to the kitchen, and delivers the food to you when it’s ready. In this scenario, the waiter acts like a messenger that receives and delivers requests between two “applications”, you and the kitchen — kind of like an API.
Here’s a real-world example of an API you might see frequently:
Let’s say you try to log into Spotify through your Google account.
For Spotify to log you in, it needs to send a request to Google to access your account information. As soon as Google receives this request, it can send back your profile data to successfully log you in. This exchange of user information from one application to another is powered through an API.
But APIs aren’t exclusive to giant corporations, like Google and Spotify. There’s plenty of APIs out there that you access for free to build your own projects.
To put my beginner skills into practice, I tested out the OpenF1 API that lets you access real-time Formula One information, like driver data, race position, and even team radio communication.
For my first OpenF1 API attempt, I wrote a very simple script using the request
library to access the team radio communication dataset.
As you can tell, the output of my first attempt is unreadable because of the large amount of data returned by the API. After more practice, I built out a longer script that combines 3 different OpenF1 datasets that outputs a much cleaner CSV file using the requests
and pandas
libraries.
And after lots of scrolling through team recordings, I eventually found Lando Norris’s latest Singapore Grand Prix recording, celebrating his race win. Give it a listen.
👩🏫 HOW I LEARNED
I learned to use APIs through the Complete Python Mastery course, “Section 11: Popular Python Packages”. The course walked through an example using the Yelp API to pull restaurant rating data, which was very exciting as a former Yelp user!
Surprisingly enough, the most challenging part about using APIs is understanding the documentation of the API itself. Highly recommend you to try out multiple API documentations on your own before relying on Youtube videos to guide you through. Even thought it may take you a little bit longer, it’ll help you get a sense of how API documentation is structured. If you’re just getting started with APIs, the OpenF1 API has the best beginner-friendly documentation that I’ve found so far!
🥺 IT’S BEEN AWHILE
I can’t believe it’s been almost a month since my last post!
September was quite eventful — I took my first trip to a new country in over a year, spent time with family, and stepped into a new role at work. Although I’ve felt guilty for not writing or practicing Python, I reminded myself that there will be times in our lives when we simply can’t do it all. What matters most is recognizing when we need to take a break and coming back to keep pushing forward on our goals 😌
Great demo Adriana. Glad you got some vacation in. Keep up the good work.
I appreciate the analogies.