pystac.extensions.xarray_assets#

Implements the Xarray Assets Extension.

class pystac.extensions.xarray_assets.AssetXarrayAssetsExtension(asset: Asset)[source]#

A concrete implementation of XarrayAssetsExtension on an Asset that extends the Asset fields to include properties defined in the XarrayAssets Extension.

This class should generally not be instantiated directly. Instead, call XarrayAssetsExtension.ext() on an Asset to extend it.

additional_read_properties: list[dict[str, Any]] | None = None#

Additional read-only properties accessible from the extended object.

These are used when extending an Asset to give access to the properties of the owning Item. If a property exists in both additional_read_properties and properties, the value in additional_read_properties will take precedence.

asset: Asset#
property open_kwargs: dict[str, Any] | None#

Additional keywords for opening the dataset

properties: dict[str, Any]#

The properties that this extension wraps.

The extension which implements PropertiesExtension can use _get_property and _set_property to get and set values on this instance. Note that _set_properties mutates the properties directly.

property storage_options: dict[str, Any] | None#

Additional keywords for accessing the dataset from remote storage

class pystac.extensions.xarray_assets.CollectionXarrayAssetsExtension(collection: Collection)[source]#

A concrete implementation of XarrayAssetsExtension on a Collection that extends the properties of the Item to include properties defined in the XarrayAssets Extension.

This class should generally not be instantiated directly. Instead, call XarrayAssetsExtension.ext() on an Collection to extend it.

collection: pystac.Collection#
properties: dict[str, Any]#

The properties that this extension wraps.

The extension which implements PropertiesExtension can use _get_property and _set_property to get and set values on this instance. Note that _set_properties mutates the properties directly.

class pystac.extensions.xarray_assets.ItemXarrayAssetsExtension(item: Item)[source]#

A concrete implementation of XarrayAssetsExtension on an Item that extends the properties of the Item to include properties defined in the XarrayAssets Extension.

This class should generally not be instantiated directly. Instead, call XarrayAssetsExtension.ext() on an Item to extend it.

item: pystac.Item#
properties: dict[str, Any]#

The properties that this extension wraps.

The extension which implements PropertiesExtension can use _get_property and _set_property to get and set values on this instance. Note that _set_properties mutates the properties directly.

class pystac.extensions.xarray_assets.XarrayAssetsExtension[source]#

An abstract class that can be used to extend the properties of a Collection, Item, or Asset with properties from the Xarray Assets Extension. This class is generic over the type of STAC Object to be extended (e.g. Item, Asset).

To create a concrete instance of XarrayAssetsExtension, use the XarrayAssetsExtension.ext() method. For example:

>>> item: pystac.Item = ...
>>> xr_ext = XarrayAssetsExtension.ext(item)
classmethod ext(obj: T, add_if_missing: bool = False) XarrayAssetsExtension[T][source]#

Extend the given STAC Object with properties from the XarrayAssets Extension.

This extension can be applied to instances of Collection, Item or Asset.

Raises:

pystac.ExtensionTypeError – If an invalid object type is passed.

classmethod get_schema_uri() str[source]#

Gets the schema URI associated with this extension.

name: Literal['xarray'] = 'xarray'#
class pystac.extensions.xarray_assets.XarrayAssetsExtensionHooks[source]#
prev_extension_ids = {'xarray'}#
schema_uri: str = 'https://stac-extensions.github.io/xarray-assets/v1.0.0/schema.json'#
stac_object_types = {'Collection', 'Feature'}#