class pystac.summaries.RangeSummary(minimum: T, maximum: T)[source]
classmethod from_dict(d: dict[str, Any]) RangeSummary[T][source]
maximum: T
minimum: T
to_dict() dict[str, Any][source]
update_with_value(v: T) None[source]
class pystac.summaries.Summaries(summaries: dict[str, Any], maxcount: int = 25)[source]
add(prop_key: str, summary: list[Any] | RangeSummary[Any] | dict[str, Any]) None[source]
clone() Summaries[source]

Clones this object.


The clone of this object

Return type:


combine(summaries: Summaries) None[source]
classmethod empty() Summaries[source]
get_list(prop: str) list[Any] | None[source]
get_range(prop: str) RangeSummary[Any] | None[source]
get_schema(prop: str) dict[str, Any] | None[source]
is_empty() bool[source]
lists: dict[str, list[Any]]
maxcount: int
other: dict[str, Any]
ranges: dict[str, pystac.summaries.RangeSummary[Any]]
remove(prop_key: str) None[source]
schemas: dict[str, dict[str, Any]]
to_dict() dict[str, Any][source]
update(summaries: Summaries) None[source]
class pystac.summaries.Summarizer(fields: str | dict[str, SummaryStrategy] | None = None)[source]

The Summarizer computes summaries from values, following the definition of fields to summarize.

The fields to summarize can be provided as a JSON file or as a dictionary of field names and SummaryStrategys. If nothing is provided, a default JSON file will be used.

Only fields that are in the Item properties can be summarized. Thus it is not possible to summarize the top-level fields such as id or assets.

For more information about the structure of the fields JSON file, see: stac-utils/stac-fields

The default JSON file used is a snapshot of the following file at the time of the pystac release:


fields – A string containing the path to the json file with field descriptions. Alternatively, a dict with the field names as keys and SummaryStrategys as values. If nothing is passed, a default file with field descriptions will be used.

summarize(source: Collection | Iterable[Item]) Summaries[source]

Creates summaries from items

summaryfields: dict[str, pystac.summaries.SummaryStrategy]
class pystac.summaries.SummaryStrategy(value)[source]

An enumeration.

ARRAY = 'v'
RANGE = 'r'
SCHEMA = 's'