pystac.extensions.storage#
Implements the Storage Extension.
- class pystac.extensions.storage.AssetStorageExtension(asset: Asset)[source]#
A concrete implementation of
StorageExtension
on anAsset
that 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 anAsset
to extend it.
- class pystac.extensions.storage.CloudPlatform(value)[source]#
An enumeration.
- ALIBABA = 'ALIBABA'#
- AWS = 'AWS'#
- AZURE = 'AZURE'#
- GCP = 'GCP'#
- IBM = 'IBM'#
- ORACLE = 'ORACLE'#
- OTHER = 'OTHER'#
- class pystac.extensions.storage.ItemAssetsStorageExtension(item_asset: AssetDefinition)[source]#
- asset_defn: item_assets.AssetDefinition#
- class pystac.extensions.storage.ItemStorageExtension(item: Item)[source]#
A concrete implementation of
StorageExtension
on anItem
that 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 anItem
to extend it.- item: pystac.Item#
The
Item
being extended.
- class pystac.extensions.storage.StorageExtension[source]#
An abstract class that can be used to extend the properties of an
Item
orAsset
with 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
Item
orAsset
.- 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: 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
Item
orAsset
.- 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).
- classmethod summaries(obj: Collection, add_if_missing: bool = False) SummariesStorageExtension [source]#
Returns the extended summaries object for the given collection.
- class pystac.extensions.storage.StorageExtensionHooks[source]#
-
- stac_object_types = {STACObjectType.COLLECTION, STACObjectType.ITEM}#
- class pystac.extensions.storage.SummariesStorageExtension(collection: Collection)[source]#
A concrete implementation of
SummariesExtension
that extends thesummaries
field of aCollection
to include properties defined in the Storage Extension.- property platform: list[CloudPlatform] | None#
Get or sets the summary of
StorageExtension.platform
values for this Collection.
- property region: list[str] | None#
Get or sets the summary of
StorageExtension.region
values for this Collection.
- property requester_pays: list[bool] | None#
Get or sets the summary of
StorageExtension.requester_pays
values for this Collection.
- summaries: Summaries#
The summaries for the
Collection
being extended.
- property tier: list[str] | None#
Get or sets the summary of
StorageExtension.tier
values for this Collection.