Today’s lecture videos are all about getting ready to work on P2.

In order to use the lecture examples for today, you should move them into your P2 folder. It should look something like this:

├── apis
├── gui_example.py
├── tests
└── audio_example.py
└── yelp_example.py

In order for them to work, you’ll need to have run the “Setup Instructions” on the P2 page which asks you to install several external Python packages. If you have trouble, bring your questions to the Tutorial or post a private post on edSTEM and we can get them fixed!

Inside of project 2, we have multiple libraries available which makes importing and using these libraries a little funky. We import things in a familiar way…

from apis import audio

But because there are multiple libraries available in our apis folder (e.g. gui, yelp, twilio, and audio), when we call the functions in these apis we still have to specify which library they come from when we call them. So for example if I want to use the get_genres function of the audio api, then we have to call it by saying audio.get_genres.... If I want to use print from the gui library, then I have to call it by saying gui.print(..., etc.

For all of the API functions in P2, you must use the syntax library_name.function_name(...).


Today's Resources

1. Exercise Files

Download Exercise Files

2. Pre-Recorded Lecture Video(s), Mini-Quizzes, and Live Recordings

Available Videos
Link Title Type Duration
Video 1 Intro to the Yelp API pre-recorded 11:57
Video 2 Intro to the Audio API pre-recorded 10:45
Video 3 Intro to the GUI API

(MQ - No Longer Available)

video_quiz 11:47
Video 4 Intro to the Twilio API pre-recorded 4:43