pystac.extensions.storage#
Implements the Storage Extension.
https://github.com/stac-extensions/storage
- class pystac.extensions.storage.AssetStorageExtension(asset: pystac.asset.Asset)[source]#
Bases:
pystac.extensions.storage.StorageExtension[pystac.asset.Asset]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)[source]#
Bases:
pystac.utils.StringEnumAn enumeration.
- ALIBABA = 'ALIBABA'#
- AWS = 'AWS'#
- AZURE = 'AZURE'#
- GCP = 'GCP'#
- IBM = 'IBM'#
- ORACLE = 'ORACLE'#
- OTHER = 'OTHER'#
- class pystac.extensions.storage.ItemStorageExtension(item: pystac.item.Item)[source]#
Bases:
pystac.extensions.storage.StorageExtension[pystac.item.Item]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.- item: pystac.item.Item#
The
Itembeing extended.
- class pystac.extensions.storage.StorageExtension(*args, **kwds)[source]#
Bases:
Generic[pystac.extensions.storage.T],pystac.extensions.base.PropertiesExtension,pystac.extensions.base.ExtensionManagementMixin[Union[pystac.collection.Collection,pystac.item.Item]]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: Optional[pystac.extensions.storage.CloudPlatform] = None, region: Optional[str] = None, requester_pays: Optional[bool] = None, tier: Optional[str] = None) None[source]#
Applies Storage Extension properties to the extended
ItemorAsset.- Parameters
platform (str, CloudProvider) – 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: pystac.extensions.storage.T, add_if_missing: bool = False) pystac.extensions.storage.StorageExtension[pystac.extensions.storage.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.
- property platform: Optional[pystac.extensions.storage.CloudPlatform]#
Get or sets the cloud provider where data is stored.
- Returns
str or None
- 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.
- property region: Optional[str]#
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).
- classmethod summaries(obj: pystac.collection.Collection, add_if_missing: bool = False) pystac.extensions.storage.SummariesStorageExtension[source]#
Returns the extended summaries object for the given collection.
- class pystac.extensions.storage.StorageExtensionHooks[source]#
Bases:
pystac.extensions.hooks.ExtensionHooks- stac_object_types = {STACObjectType.COLLECTION, STACObjectType.ITEM}#
- class pystac.extensions.storage.SummariesStorageExtension(collection: pystac.collection.Collection)[source]#
Bases:
pystac.extensions.base.SummariesExtensionA concrete implementation of
SummariesExtensionthat extends thesummariesfield of aCollectionto include properties defined in the Storage Extension.- property platform: Optional[List[pystac.extensions.storage.CloudPlatform]]#
Get or sets the summary of
StorageExtension.platformvalues for this Collection.
- property region: Optional[List[str]]#
Get or sets the summary of
StorageExtension.regionvalues for this Collection.
- property requester_pays: Optional[List[bool]]#
Get or sets the summary of
StorageExtension.requester_paysvalues for this Collection.
- summaries: pystac.summaries.Summaries#
The summaries for the
Collectionbeing extended.
- property tier: Optional[List[str]]#
Get or sets the summary of
StorageExtension.tiervalues for this Collection.