Python Client Library for STAC

Software License Build Status Code Coverage Documentation Status Software Life Cycle Release Release Join us at Discord

DEPRECATED

This repo is no longer supported, please consider using PySTAC-Client instead.

About

stac.py is a Python client API for the SpatioTemporal Asset Catalog (STAC) specification. The client library supports version 0.7.0, 0.8.0, 0.8.1, and 0.9.0 of the STAC API. Nevertheless, we aim to support new versions of the API in future releases of stac.py. See the milestones to get the list of versions planned in each release.

Installation

To install stac.py under your virtualenv, ensure you have the latest setuptools:

pip install -U setuptools

Then:

pip install stac.py

If you want rasterio support:

pip install stac.py[geo]

For development version:

pip install https://github.com/brazil-data-cube/stac.py/tarball/master

Usage

Below is a quick example on how to use `stac.py.

from stac import STAC

service = stac.STAC("https://brazildatacube.dpi.inpe.br/stac", access_token="your-token")

print(service.catalog) # show all available collections

collection = service.collections('CB4_64_16D_STK') # get a collection

items = collection.get_items() # get the collection items

arr = items[0].read("BAND14") # read the asset 'BAND14' from the first item as a numpy array.

For more information take a look at our Documentation page.

Additional Notes