# pystac.extensions.table

Implements the Table Extension.

class pystac.extensions.table.AssetTableExtension(asset: Asset)

  A concrete implementation of `TableExtension` on an `Asset` 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 an `Asset` to extend it.

  asset_href: str
  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 opening the dataset

class pystac.extensions.table.CollectionTableExtension(collection: Collection)

  A concrete implementation of `TableExtension` on a `Collection` 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 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.

  property tables: dict[str, Table]

    A mapping of table names to table objects

class pystac.extensions.table.Column(properties: dict[str, Any])

  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.

  property name: str

    The column name

  properties: dict[str, Any]
  to_dict() → dict[str, Any]

    Returns a dictionary representing this `Column`.

class pystac.extensions.table.ItemAssetsTableExtension(item_asset: AssetDefinition)
  asset_defn: item_assets.AssetDefinition
  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.table.ItemTableExtension(item: Item)

  A concrete implementation of `TableExtension` on an `Item` 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 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.table.Table(properties: dict[str, Any])

  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.

  property name: str

    The table name

  properties: dict[str, Any]
  to_dict() → dict[str, Any]

    Returns a dictionary representing this `Table`.

class pystac.extensions.table.TableExtensinoHooks
  prev_extension_ids = {'https://stac-extensions.github.io/table/v1.0.0/schema.json', 'https://stac-extensions.github.io/table/v1.0.1/schema.json', 'https://stac-extensions.github.io/table/v1.1.0/schema.json', 'table'}
  schema_uri: str = 'https://stac-extensions.github.io/table/v1.2.0/schema.json'
  stac_object_types = {STACObjectType.COLLECTION, STACObjectType.ITEM}

class pystac.extensions.table.TableExtension

  An abstract class that can be used to extend the properties of a `Collection`, `Item`, or `Asset` 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 the `TableExtension.ext()` method. For example:

      >>> item: pystac.Item = ...
      >>> tbl_ext = TableExtension.ext(item)

  property columns: list[Column] | None

    A list of `Column` objects describing each column

  classmethod ext(obj: T, add_if_missing: bool = False) → TableExtension[T]

    Extend the given STAC Object with properties from the Table 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

    Gets the schema URI associated with this extension.

  name: Literal['table'] = 'table'
  property primary_geometry: str | None

    The primary geometry column name

  property row_count: int | None

    The number of rows in the dataset

previous

pystac.extensions.storage

next

pystac.extensions.timestamps