When we talk about APIs in relation to Python, we usually refer to the classes and the functions that a module presents to us for interact action. In this chapter, we'll be talking about something different, that is, web APIs.
A web API is a type of API that you interact with through the HTTP protocol. Nowadays, many web services provide a set of HTTP calls, which are designed to be used programmatically by clients; they are meant to be used by machines rather than by humans. Through these interfaces, it's possible to automate interaction with the services and to perform tasks such as extracting data, configuring the service in some way, and uploading your own content to the service.
The following topics will be covered in this chapter:
- Introduction to REST APIs
- Introduction to JSON and the json module
- Interacting with a JSON...