Heading image

Prerequisites

  1. A registered app with the Unsplash developers site.
  2. Familiarity with Pipenv — see my post for the minimum you will need.
  3. An environment setup with JupyterLab.

Getting started

Creating the notebook

  1. Load the environment variables.
  2. Use the Unsplash API to grab the source image.
  3. Save the image to the parent directory.
  4. Display the downloaded image in the notebook using Pillow.

Load the environment variables

Fetching the link for a random photo

Download the image to the parent folder

Executed Python notebook

Summary

Resources and further reading

  1. Unsplash developers site.
  2. The ABCs of Pipenv for the minimum you will need.
  3. Hello, JupyterLab.
  4. salvoventura/pyunsplash

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store