This lesson is in the early stages of development (Alpha version)

Introduction to the Web and Online APIs: Setup

To follow this lesson, you will need to have a Unix shell and Python installed. If you do not already have these set up, then please follow the instructions at the Carpentries workshop template

Requests and BeautifulSoup4

We will be using the requests and beautifulsoup4 libraries. Please install them with your Python package manager; for example, with pip, use:

$ pip install --user requests beautifulsoup4

or with Anaconda use:

$ conda install requests beautifulsoup4

GitHub Personal Access Token

We will be connecting to GitHub’s API in this lesson. To do this, might decide to use an Access Token (alternatively, you can use your GitHub password). To get one:

Remember to keep this file safe, or to delete it after the lesson, as anyone with access to the token can use it to manage your account and repositories. You can also delete it from the Settings > Developer Settings > Personal Access Token page on GitHub, to be 100% sure.

(Optional) Met Office API Keys

In some additional challenges we will be making requests from the Met Office Data point. In order to follow this section you will need a valid “API key” for this data source. To obtain this: