requests Library for API
Lesson 4 of 10 in Coddy's API in Python course.
In Python, we have to import an external library in order to be able to connect to an API. There are many libraries that support such connections.
For this course, we will be using, requests library.
In order to import a library, at the top of the code we have to write the following command.
import LIBRARY_NAMESince we are using requests, you must replace LIBRARY_NAME with requests.
Challenge
EasyImport the requests library.
Try it yourself
All lessons in API in Python
2API in Python
requests Library for APIrequests Method to Retrieverequests Method to Send DataManipulating requests Response3Weather Fetch API Program
API Connection to ServerGET Request to ServerDisplaying Appropriate Results