stac.py 0.9.0.post13
Python Client Library for STAC.
License: MIT
Keywords: SpatioTemporal Asset Catalog,stac,earth-observation,geospatial,gis

..
    This file is part of Python Client Library for STAC.
    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.


==============================
Python Client Library for STAC
==============================


.. image:: https://img.shields.io/badge/license-MIT-green
        :target: https://github.com//brazil-data-cube/stac.py/blob/master/LICENSE
        :alt: Software License


.. image:: https://drone.dpi.inpe.br/api/badges/brazil-data-cube/stac.py/status.svg
        :target: https://drone.dpi.inpe.br/api/badges/brazil-data-cube/stac.py
        :alt: Build Status


.. image:: https://codecov.io/gh/brazil-data-cube/stac.py/branch/master/graph/badge.svg?token=WWQ3HQAUKK
        :target: https://codecov.io/gh/brazil-data-cube/stac.py
        :alt: Code Coverage


.. image:: https://readthedocs.org/projects/stacpy/badge/?version=latest
        :target: https://stacpy.readthedocs.io/en/latest/
        :alt: Documentation Status


.. image:: https://img.shields.io/badge/lifecycle-maturing-blue.svg
        :target: https://www.tidyverse.org/lifecycle/#maturing
        :alt: Software Life Cycle


.. image:: https://img.shields.io/github/tag/brazil-data-cube/stac.py.svg
        :target: https://github.com/brazil-data-cube/stac.py/releases
        :alt: Release


.. image:: https://img.shields.io/pypi/v/stac.py
        :target: https://pypi.org/project/stac.py/
        :alt: Release


.. image:: https://img.shields.io/discord/689541907621085198?logo=discord&logoColor=ffffff&color=7389D8
        :target: https://discord.com/channels/689541907621085198#
        :alt: Join us at Discord

About
=====


``stac.py`` is a Python client API for the `SpatioTemporal Asset Catalog (STAC) specification <https://github.com/radiantearth/stac-spec>`_. 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 <https://github.com/brazil-data-cube/stac.py/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``.

.. code-block:: python

    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 <https://stacpy.readthedocs/en/latest/>`_ page.

Developer Documentation
=======================


See `CONTRIBUTING <CONTRIBUTING.rst>`_.


License
=======


.. admonition::
    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.


..
    This file is part of Python Client Library for STAC.
    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.


Changes
=======


Version 0.9.0-13 (2021-07-19)
-----------------------------

- Support STAC root url ended in '/' that aren't 'stac/' (`#96 <https://github.com/brazil-data-cube/stac.py/issues/96>`_).
- Fix bug in get 'summaries' when not is a dictionary (`#97 <https://github.com/brazil-data-cube/stac.py/issues/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 <https://github.com/brazil-data-cube/stac.py/issues/81>`_).
- Improve error message while downloading or accessing any asset (`#68 <https://github.com/brazil-data-cube/stac.py/issues/68>`_).


Version 0.9.0-11 (2021-04-22)
-----------------------------

- Fix bug in /search using GET method (`#86 <https://github.com/brazil-data-cube/stac.py/issues/86>`_).


Version 0.9.0-10 (2021-04-09)
-----------------------------

- Fix stac_search using GET method with two collections (`#83 <https://github.com/brazil-data-cube/stac.py/issues/83>`_).


Version 0.9.0-9 (2021-03-29)
----------------------------

- Fix package installation, adding Shapely as required dependency (`#78 <https://github.com/brazil-data-cube/stac.py/issues/78>`_).


Version 0.9.0-8 (2021-03-24)
----------------------------

- Add common way for dealing with minimum bounding region in search (`#75 <https://github.com/brazil-data-cube/stac.py/issues/75>`_).


Version 0.9.0-7 (2021-03-24)
----------------------------


API improvements:

- Download all assets from an item (`#66 <https://github.com/brazil-data-cube/stac.py/issues/66>`_).

- Add a way for reading partial raster given an envelope in a specific CRS (`#71 <https://github.com/brazil-data-cube/stac.py/issues/71>`_).

- Fix download folder creation in asset (`#64 <https://github.com/brazil-data-cube/stac.py/issues/64>`_).

- Add Drone integration (`#60 <https://github.com/brazil-data-cube/stac.py/issues/60>`_).


Version 0.9.0-6 (2020-12-10)
----------------------------


- Add tqdm progress bar to asset download (`#52 <https://github.com/brazil-data-cube/stac.py/pull/52>`_).

- Add collections to stac (`#55 <https://github.com/brazil-data-cube/stac.py/issues/55>`_).


Version 0.9.0-5 (2020-09-22)
----------------------------


- Add feature iterator on ItemCollection (`#50 <https://github.com/brazil-data-cube/stac.py/pull/50>`_).

- Add function to read Item as numpy array (`#50 <https://github.com/brazil-data-cube/stac.py/pull/50>`_).


Version 0.9.0-4 (2020-09-15)
----------------------------


- Add Jupyter integration: `#47 <https://github.com/brazil-data-cube/stac.py/pull/47>`_.


Version 0.9.0-3 (2020-09-14)
----------------------------


- Publish into pypi (`#46 <https://github.com/brazil-data-cube/stac.py/pull/46>`_).


Version 0.9.0-2 (2020-09-10)
----------------------------


- Bug fix: properly handle query parameter (`#42 <https://github.com/brazil-data-cube/stac.py/issues/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 <https://semver.org/>`_.

- License: `MIT <https://github.com/brazil-data-cube/stac.py/blob/master/LICENSE>`_.