Skip to main content

Python Client Library for STAC.

Project description

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

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.

Developer Documentation

See CONTRIBUTING.

License

Changes

Version 0.9.0-13 (2021-07-19)

  • Support STAC root url ended in ‘/’ that aren’t ‘stac/’ (#96).

  • Fix bug in get ‘summaries’ when not is a dictionary (#97).

  • Returns all collections in the catalog function, regardless of whether it is set to rel=child.

Version 0.9.0-12 (2021-06-15)

  • Improve ReadTheDocs documentation related with API (#81).

  • Improve error message while downloading or accessing any asset (#68).

Version 0.9.0-11 (2021-04-22)

  • Fix bug in /search using GET method (#86).

Version 0.9.0-10 (2021-04-09)

  • Fix stac_search using GET method with two collections (#83).

Version 0.9.0-9 (2021-03-29)

  • Fix package installation, adding Shapely as required dependency (#78).

Version 0.9.0-8 (2021-03-24)

  • Add common way for dealing with minimum bounding region in search (#75).

Version 0.9.0-7 (2021-03-24)

API improvements:

  • Download all assets from an item (#66).

  • Add a way for reading partial raster given an envelope in a specific CRS (#71).

  • Fix download folder creation in asset (#64).

  • Add Drone integration (#60).

Version 0.9.0-6 (2020-12-10)

  • Add tqdm progress bar to asset download (#52).

  • Add collections to stac (#55).

Version 0.9.0-5 (2020-09-22)

  • Add feature iterator on ItemCollection (#50).

  • Add function to read Item as numpy array (#50).

Version 0.9.0-4 (2020-09-15)

  • Add Jupyter integration: #47.

Version 0.9.0-3 (2020-09-14)

  • Publish into pypi (#46).

Version 0.9.0-2 (2020-09-10)

  • Bug fix: properly handle query parameter (#42).

Version 0.9.0-1 (2020-09-01)

  • Improved tests.

Version 0.9.0-0 (2020-09-01)

  • Support for STAC version 0.9.0.

  • Review of Sphinx project.

Version 0.8.1-0 (2020-04-14)

  • Support for STAC version 0.8.1.

  • Added tests for STAC version 0.8.1.

Version 0.8.0-0 (2020-04-03)

  • Support for STAC version 0.8.0.

  • Added tests for STAC version 0.8.0.

  • Added CLI support.

  • Added tests for CLI.

  • Removed stac.collections property

Version 0.7.0-0 (2020-02-27)

  • First experimental version.

  • Support for STAC version 0.7.0.

  • Documentation system based on Sphinx.

  • Documentation integrated to Read the Docs.

  • Unit-tests with code coverage.

  • Package support through Setuptools.

  • Installation and use instructions.

  • Source code versioning based on Semantic Versioning 2.0.0.

  • License: MIT.

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

stac.py-0.9.0.post13.tar.gz (51.5 kB view hashes)

Uploaded Source

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