Setting up a Python development environment

Common tools & packages useful to working with Planet's APIs and data

Development Environment Setup

The Basics

The following tools are regularly used in Planet School's guides:

If you choose to follow along with code here, you may find it useful to install these libraries in your development environment:

$ pip install requests
$ pip install retrying
$ pip install jq

# Requires Node.js
$ npm install -g geojsonio-cli

For convenience, some examples here may pipe JSON API output to jq and filter for a specific field. You may prefer to remove the jq filter in order to familiarize yourself with the complete API objects.

Working with Planet Data

When working with datasets like Planet's satellite imagery, here are a few useful Python libraries to know:

Rasterio is a free and open source library for working with geospatial raster imagery. Rasterio is used extensively in the Python code that you'll find through Planet School, as well as in most Jupyter Notebooks in Planet's open source Notebook collection.

Fiona is a sibling library to Rasterio used when working with geospatial vector data. While less frequently used in Planet's developer resources, Fiona can still come in handy when, for example, creating or manipulating an AOI (Area of Interest) vector dataset.

NumPy and MatPlotLib can be used to manipulate, plot, and display raster data that has been loaded via Rasterio.