API Reference#

This API reference is auto-generated from the Python docstrings. The table of contents on the left is organized by module. The sections below are organized based on concepts and sections within the STAC Spec and PySTAC itself.

Base Structures & Classes#

These are the core Python classes representing entities within the STAC Spec. These classes provide convenient methods for serializing and deserializing from JSON, extracting properties, and creating relationships between entities.

Items#

Representations of Items and related structures like Asset Objects.

Collections#

These are representations of Collections and related structures.

Catalogs#

Representations of Catalogs and related structures.

I/O#

These classes are used to read and write files from disk or over the network, as well as to serialize and deserialize STAC object to and from JSON.

Client#

A convenience method for accessing pystac-client

Example:

from pystac.client import Client

Extensions#

PySTAC provides support for the following STAC Extensions:

The following classes are used internally to implement these extensions and may be used to create custom implementations of STAC Extensions not supported by the library (see Adding New and Custom Extensions for details):

Catalog Layout#

These classes are used to set the HREFs of a STAC according to some layout. The templating functionality is also used when generating subcatalogs based on a template.

Errors#

The following exceptions may be raised internally by the library.

Serialization#

The pystac.serialization sub-package contains tools used internally by PySTAC to identify, serialize, and migrate STAC objects:

  • pystac.serialization.identify: Tools for identifying STAC objects

  • pystac.serialization.migrate: Tools for migrating STAC objects from a previous STAC Spec version.

Validation#

Note

The tools described here require that you install PySTAC with the validation extra (see the documentation on installing dependencies for details).

PySTAC includes a pystac.validation package for validating STAC objects, including from PySTAC objects and directly from JSON.

Internal Classes#

These classes are used internally by PySTAC for caching.