Python client library and CLI for Planet's public API.
Via pip:
$ pip install planetThe --user flag is highly recommended for those new to pip.
A PEX executable (Windows not supported) and source releases are here.
Online documentation: https://planetlabs.github.io/planet-client-python/index.html
Documentation is also provided for download here.
To develop with or use the library in your own projects, see the wiki.
As a quick start to develop, install virtualenvwrapper.
$ pip install virtualenvwrapper
Then check where the package was installed by running
which virtualenvwrapper.sh
And copying what's returned, which could look like this
/Library/Frameworks/Python.framework/Versions/3.8/bin/virtualenvwrapper.sh
Next, add the following lines to your bash profile.
export WORKON_HOME=$HOME/.virtualenvs export PROJECT_HOME=$HOME/Devel source /Library/Frameworks/Python.framework/Versions/3.8/bin/virtualenvwrapper.sh
Finally, source your bash profile and run the following lines in cl to create the virtual environment
cd path/to/planet-client-python mkvirtualenv planet-client-python workon planet-client-python pip install -e .
The API requires an account for use. Signup here.
This can be provided via the environment variable PL_API_KEY or the flag -k or --api-key.
Using planet init your account credentials (login/password) can be used to obtain the api key.
Hint: autocompletion can be enabled in some shells using:
eval "$(_PLANET_COMPLETE=source planet)"
Basics and help:
planet
The CLI provides access to the data API
planet data
OR specific command help:
planet data download --help