Skip to main content

Planet API Client

Project description

PRE-ALPHA SOFTWARE - MAY CHANGE

Initial, incomplete, strawman effort at a Python client to Planet’s public API.

https://travis-ci.org/planetlabs/planet-client-python.svg?branch=master

Documentation

https://planetlabs.github.io/planet-client-python/index.html

Installation

Recommend using a virtual environment.

Shellish:

git clone git@github.com:planetlabs/planet-client-python.git
cd planet-client-python
pip install -e .

Enabling bash completion (planet <tab> <tab>):

eval "$(_PLANET_COMPLETE=source planet)"

Usage

As a library

Pending

Command line use

Basics and help:

planet

OR specific command help:

planet get-scenes-list --help

To do anything real, one must provide an API key. This can be done via the environment variable PL_API_KEY or the flag -k or –api-key.

Examples

Get a visual ortho scene by id (writes to working directory):

planet download 20141008_170544_0907

Get an analytic ortho scene by id:

planet download 20141008_170544_0907 --analytic

Get scene metadata by id (and pretty print):

planet fetch_scene_info -pp 20141008_170544_0907

Testing

Install Test Dependencies

A few extra libraries are needed for testing:

pip install -e .[test]

Running the Tests

There are two suites of tests, one for the cli, the other for the library module.

Both can be run using:

py.test

Distributing

This requires that development libraries are installed:

pip install -e .[test]

An executable python file can be built by running:

pex  .  -o dist/planet -m planet.scripts:cli

This can be executed directly on systems with a python executable and in an environment (bash shell) capable of interpreting a shebang.

TODO!

  • more command line flags/tools (query filters, for example)

  • more docs

  • more tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

planet-0.0.2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

planet-0.0.2-py2-none-any.whl (17.1 kB view details)

Uploaded Python 2

File details

Details for the file planet-0.0.2.tar.gz.

File metadata

  • Download URL: planet-0.0.2.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for planet-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d2b83ca6499c050f6b2dd2b0722523e84ccf667857ae63c4afa173ef38b91fe3
MD5 413a31c6155d71b8b8359df7771d1df0
BLAKE2b-256 cecbad2c0513a7cd1b8451994fa28bf3da5af0436807d2c7f2b83a6f9f1cb48b

See more details on using hashes here.

Provenance

File details

Details for the file planet-0.0.2-py2-none-any.whl.

File metadata

File hashes

Hashes for planet-0.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 3445f08bd15a127b46a348f85974b139dd290fde73a52dc00521b5b782e78913
MD5 cce57e5b41b43d44696a4c6b4919f860
BLAKE2b-256 4661c5cb165c38db841ffe34cc143b7301883025f6433d4a28ecfab01329617e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page