This repo is no longer supported, please consider using PySTAC-Client instead.
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.
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
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.
See CONTRIBUTING.
Copyright (C) 2019-2021 INPE.
Python Client Library for STAC is free software; you can redistribute it and/or modify it under the terms of the MIT License; see LICENSE file for more details.