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:
- Visit GitHub and log in.
- In Settings > Developer Settings > Personal Access Token, click on “Generate new token”.
- In the options, tick only the “public_repo” option under “repo”, write a sensible note, and click on “Generate Token” at the bottom of the page.
- Save it into a file,
as you will not be able to see it again.
In the following, we will refer to this file
with
github-access-token.txt
.
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.