Skip to content
Python library for working with any SpatioTemporal Asset Catalog (STAC)
Python Shell
Branch: develop
Clone or download
lossyrob Merge pull request #50 from azavea/rde/feature/identify-version
Add functionality for identifying STAC JSON information
Latest commit d617cba Nov 8, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis Updates based on flake8 and yapf. Oct 25, 2019
docs Merge pull request #50 from azavea/rde/feature/identify-version Nov 8, 2019
pystac Create reusable merge_common_properties method. Nov 8, 2019
tests
.flake8 Additional documentation additions. Oct 25, 2019
.gitignore Updates to Quickstart Nov 1, 2019
.travis.yml Install the pkg in editable mode before testing Nov 4, 2019
CHANGELOG.md
LICENSE Initial commit. Sep 12, 2019
README.md Merge pull request #44 from azavea/rde/stac-sprint-tutorial Nov 5, 2019
requirements-dev.txt
setup.py

README.md

PySTAC

Build Status PyPI version Documentation Gitter chat License

PySTAC is a library for working with SpatialTemporal Asset Catalog in Python 3.

Installation

PySTAC has a single dependency (python-dateutil). PySTAC can be installed from pip or the source repository.

> pip install pystac

From source repository:

> git clone https://github.com/azavea/pystac.git
> cd pystac
> pip install .

Versions

To install a specific versions of STAC, install the matching version of pystac.

> pip install pystac==0.3.*

The table below shows the corresponding versions between pystac and STAC:

pystac STAC
0.3.x 0.8.x

Documentation

See the documentation page for the latest docs.

Developing

To ensure development libraries are installed, install everything in requirements-dev.txt:

> pip install -r requirements-dev.txt

Unit Tests

Unit tests are in the tests folder. To run unit tests, use unittest:

> python -m unittest discover tests

Code quality checks

PySTAC uses flake8 and yapf for code formatting and style checks.

To run the flake8 style checks:

> flake8 pystac
> flake8 tests

To format code:

> yapf -ipr pystac
> yapf -ipr tests

You could also run the .travis/style_checks script to check flake8 and yapf.

Documentation

To build and develop the documentation locally, make sure sphinx is available (which is installed with requirements-dev.txt), and use the Makefile in the docs folder:

> cd docs
> make html
> make livehtml

Use 'make' without arguments to see a list of available commands.

Note: nbsphinx requires that a local pystac is installed; use pip install -e ..

Runing the quickstart and tutorials

There is a quickstart and tutorials written as jupyter notebooks in the docs/tutorials folder. To run the notebooks, run a jupyter notebook with the docs directory as the notebook directory:

> PYTHONPATH=`pwd`:$PYTHONPATH jupyter notebook --ip 0.0.0.0 --port 8888 --notebook-dir=docs

You can then navigate to the notebooks and execute them.

Requires Jupyter be installed.

You can’t perform that action at this time.