Menu
Coddy logo textTech

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_NAME

Since we are using requests, you must replace LIBRARY_NAME with requests.

challenge icon

Challenge

Easy

Import the requests library.

Try it yourself

All lessons in API in Python