From the course: Hands-On Introduction: Python

Unlock the full course today

Join today to access over 24,100 courses taught by industry experts.

Loading a JSON dataset

Loading a JSON dataset

- [Instructor] So in this one we're going to implement an HTTP client using the very popular package, requests. Now for that we're going to install requests, and one of the things I like about using Codespaces, is that I can relax a little bit about installing third party packages, since this is a remote environment. You should still be careful, but requests is a very popular package in the Python ecosystem. So I'm going to install it by typing in pip install requests, and it's already installed, and if you are not using Codespaces, you may have to type in something like, python3 -m pip install requests. So with requests installed, I'm almost set to go, but first I have to import it, so import requests here on line one. So now that it's all set up, I have to import it. Here I am in 04 01 begin main.py, and I can collapse this right here to get a little bit more screen space. And after I import requests, I just use it…

Contents