What you'll learn:
- Installing external libraries using pip
- Using other people's code using import
- Using APIs to get someone else's data
- Using APIs to get someone else's services
- Using APIs to improve the data you have
- The tradeoffs between datasets and APIs
- How information is returned from an API
- How to use an API to get information or perform an action
Just a few practical examples:
- Find the latitude / longitude for a list of addresses and map it
- Send a text message using the Twilio API
- Receive a text message using the Twilio API and do something with the information
- Combine related data sets (Shut That Down, Watch This Instead)
Examples in real projects:
- Find out whether a movie passed the Bechdel Test using the BechdelTest.com API Used in http://shannonvturner.com/bechdel
- Get a movie's IMDB rating and other info using the OMDB API Used in http://shannonvturner.com/bechdel
- Get one artwork from the Brooklyn Museum's API Used in http://shannonvturner.com/art
- Get a politician's campaign contributors using the Sunlight Foundation's Influence Explorer API Used in http://shutthatdown.com
Code Samples:
Exercises:
- Bechdel Test API: https://github.com/shannonturner/python-lessons/blob/master/playtime/lesson05_firstapi.py
Concepts learned:
- APIs
- Datasets
- JSON
- REST
- Endpoints
Keywords learned:
- import
Libraries learned:
- requests