pystac.extensions.storage#
Implements the Storage Extension.
- class pystac.extensions.storage.AssetStorageExtension(asset: Asset)[source]#
A concrete implementation of
StorageExtensionon anAssetthat extends the Asset fields to include properties defined in the Storage Extension.This class should generally not be instantiated directly. Instead, call
StorageExtension.ext()on anAssetto extend it.
- class pystac.extensions.storage.CloudPlatform(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]#
- ALIBABA = 'ALIBABA'#
- AWS = 'AWS'#
- AZURE = 'AZURE'#
- GCP = 'GCP'#
- IBM = 'IBM'#
- ORACLE = 'ORACLE'#
- OTHER = 'OTHER'#
- class pystac.extensions.storage.ItemAssetsStorageExtension(item_asset: ItemAssetDefinition)[source]#
- asset_defn: ItemAssetDefinition#
- properties: dict[str, Any]#
The properties that this extension wraps.
The extension which implements PropertiesExtension can use
_get_propertyand_set_propertyto get and set values on this instance. Note that _set_properties mutates the properties directly.
- class pystac.extensions.storage.ItemStorageExtension(item: Item)[source]#
A concrete implementation of
StorageExtensionon anItemthat extends the properties of the Item to include properties defined in the Storage Extension.This class should generally not be instantiated directly. Instead, call
StorageExtension.ext()on anItemto extend it.
- class pystac.extensions.storage.StorageExtension[source]#
An abstract class that can be used to extend the properties of an
ItemorAssetwith properties from the Storage Extension. This class is generic over the type of STAC Object to be extended (e.g.Item,Asset).To create a concrete instance of
StorageExtension, use theStorageExtension.ext()method. For example:>>> item: pystac.Item = ... >>> storage_ext = StorageExtension.ext(item)
- apply(platform: CloudPlatform | None = None, region: str | None = None, requester_pays: bool | None = None, tier: str | None = None) None[source]#
Applies Storage Extension properties to the extended
ItemorAsset.- Parameters:
platform (str, CloudPlatform) – The cloud provider where data is stored.
region (str) – The region where the data is stored. Relevant to speed of access and inter-region egress costs (as defined by PaaS provider).
requester_pays (bool) – Is the data requester pays or is it data manager/cloud provider pays.
tier (str) – The title for the tier type (as defined by PaaS provider).
- classmethod ext(obj: T, add_if_missing: bool = False) StorageExtension[T][source]#
Extends the given STAC Object with properties from the Storage Extension.
This extension can be applied to instances of
ItemorAsset.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- name: Literal['storage'] = 'storage'#
- property platform: CloudPlatform | None#
Get or sets the cloud provider where data is stored.
- Returns:
str or None
- property region: str | None#
Gets or sets the region where the data is stored. Relevant to speed of access and inter-region egress costs (as defined by PaaS provider).
- property requester_pays: bool | None#
- classmethod summaries(obj: Collection, add_if_missing: bool = False) SummariesStorageExtension[source]#
Returns the extended summaries object for the given collection.
- property tier: str | None#
- class pystac.extensions.storage.StorageExtensionHooks[source]#
- prev_extension_ids: set[str] = {}#
- schema_uri: str = 'https://stac-extensions.github.io/storage/v1.0.0/schema.json'#
- stac_object_types = {'Collection', 'Feature'}#
- class pystac.extensions.storage.SummariesStorageExtension(collection: Collection)[source]#
A concrete implementation of
SummariesExtensionthat extends thesummariesfield of aCollectionto include properties defined in the Storage Extension.- property platform: list[CloudPlatform] | None#
Get or sets the summary of
StorageExtension.platformvalues for this Collection.
- property region: list[str] | None#
Get or sets the summary of
StorageExtension.regionvalues for this Collection.
- property requester_pays: list[bool] | None#
Get or sets the summary of
StorageExtension.requester_paysvalues for this Collection.
- property tier: list[str] | None#
Get or sets the summary of
StorageExtension.tiervalues for this Collection.
- class pystac.extensions.storage.T#
Generalized version of
Item,AssetorItemAssetDefinitionalias of TypeVar(‘T’, ~pystac.item.Item, ~pystac.asset.Asset, ~pystac.item_assets.ItemAssetDefinition)