pystac.extensions.table#
Implements the Table Extension.
- class pystac.extensions.table.AssetTableExtension(asset: Asset)[source]#
A concrete implementation of
TableExtension
on anAsset
that extends the Asset fields to include properties defined in the Table Extension.This class should generally not be instantiated directly. Instead, call
TableExtension.ext()
on anAsset
to extend it.
- class pystac.extensions.table.CollectionTableExtension(collection: Collection)[source]#
A concrete implementation of
TableExtension
on aCollection
that extends the properties of the Item to include properties defined in the Table Extension.This class should generally not be instantiated directly. Instead, call
TableExtension.ext()
on anCollection
to extend it.- collection: pystac.Collection#
- class pystac.extensions.table.Column(properties: Dict[str, Any])[source]#
Object representing a column of a table.
- property col_type: str | None#
Data type of the column. If using a file format with a type system (like Parquet), we recommend you use those types
- property description: str | None#
Detailed multi-line description to explain the column. CommonMark 0.29 syntax MAY be used for rich text representation.
- class pystac.extensions.table.ItemTableExtension(item: Item)[source]#
A concrete implementation of
TableExtension
on anItem
that extends the properties of the Item to include properties defined in the Table Extension.This class should generally not be instantiated directly. Instead, call
TableExtension.ext()
on anItem
to extend it.- item: pystac.Item#
- class pystac.extensions.table.Table(properties: Dict[str, Any])[source]#
Object containing a high-level summary about a table
- property description: str | None#
Detailed multi-line description to explain the table. CommonMark 0.29 syntax MAY be used for rich text representation.
- class pystac.extensions.table.TableExtensinoHooks[source]#
- prev_extension_ids = {'table'}#
- stac_object_types = {STACObjectType.COLLECTION, STACObjectType.ITEM}#
- class pystac.extensions.table.TableExtension(*args, **kwds)[source]#
An abstract class that can be used to extend the properties of a
Collection
,Item
, orAsset
with properties from the Datacube Extension. This class is generic over the type of STAC Object to be extended (e.g.Item
,Asset
).To create a concrete instance of
TableExtension
, use theTableExtension.ext()
method. For example:>>> item: pystac.Item = ... >>> tbl_ext = TableExtension.ext(item)
- classmethod ext(obj: T, add_if_missing: bool = False) TableExtension[T] [source]#
Extend the given STAC Object with properties from the Table Extension.
This extension can be applied to instances of
Collection
,Item
orAsset
.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.