Skip to main content

Python library for working with Spatiotemporal Asset Catalog (STAC).

Project description

STAC Client

CI Release PyPI version Documentation codecov

A Python client for working with STAC Catalogs and APIs.

Installation

Install from PyPi. Other than PySTAC itself, the only dependencies for pystac-client is the Python requests and dateutil libraries.

$ pip install pystac-client

Documentation

See the documentation page for the latest docs.

Development

For development, clone the repository and use the standard Python method for installing the library as an "editable link", then install the development dependencies:

$ git clone https://github.com/stac-utils/pystac-client.git
$ cd pystac-client
$ pip install -e .
$ pip install -r requirements-dev.txt

To run just the tests

$ pytest -v -s --block-network --cov pystac_client --cov-report term-missing

The pystac-client tests use vcrpy to mock API calls with "pre-recorded" API responses. When adding new tests use the @pytest.mark.vcr decorator function to indicate vcrpy should be used. Record the new responses and commit them to the repository.

$ pytest -v -s --record-mode new_episodes --block-network
$ git add <new files here>
$ git commit -a -m 'new test episodes'

To update pystac-client to use future versions of STAC API, the existing recorded API responsees should be "re-recorded":

$ pytest -v -s --record-mode rewrite --block-network
$ git commit -a -m 'updated test episodes'

Pull Requests

To make Pull Requests to pystac-client, the code must pass linting, formatting, and code tests. To run the entire suit of checks and tests that will be run the GitHub Action Pipeline, use the test script.

$ scripts/test

If automatic formatting is desired (incorrect formatting will cause the GitHub Action to fail), use the format script and commit the resulting files:

$ scripts/format
$ git commit -a -m 'formatting updates'

To build the documentation, install the documentation requirements, then use the build-docs script:

$ pip install -r requirements-docs.txt
$ scripts/build-docs

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

pystac-client-0.3.3.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

pystac_client-0.3.3-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file pystac-client-0.3.3.tar.gz.

File metadata

  • Download URL: pystac-client-0.3.3.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for pystac-client-0.3.3.tar.gz
Algorithm Hash digest
SHA256 a1c07c6730ccd555cfc8915bb00e6f5aef5224cf5b00528158d204839278f614
MD5 d3a31c9c6d6e968729eced1e74257538
BLAKE2b-256 659b133ca45d2dad1c4ab6394036ff6a3d4ee9be80c268842a39b36613e72917

See more details on using hashes here.

File details

Details for the file pystac_client-0.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pystac_client-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6b954efbb4ac61eff6675e9eb113a7818afde111a1b87ebe66c4cb8f91306a87
MD5 e801c3cec9931dba7b06ee8e2ea2bdb5
BLAKE2b-256 976b8d156f9d1fefbf56cecaa5e4907910758fe9e4496c1868befbbf56bdb778

See more details on using hashes here.

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