Skip to content

Module stac_fastapi.core.queryables

A module for managing queryable attributes.

Functions

get_properties_from_cql2_filter

python3 def get_properties_from_cql2_filter( cql2_filter: dict[str, typing.Any] ) -> set[str]

Recursively extract property names from a CQL2 filter.

Property names are normalized by stripping the 'properties.' and 'assets.' prefix if present, to match queryables stored without the prefix.

Classes

QueryablesCache

python3 class QueryablesCache( database_logic: Any )

A thread-safe, time-based cache for queryable properties.

Methods

get_all_queryables

python3 def get_all_queryables( self ) -> set[str]

Return a set of all queryable attributes across all collections.

This method will update the cache if it's stale or has been cleared.

reload_settings

python3 def reload_settings( self )

Reload settings from environment variables.

validate

python3 def validate( self, fields: set[str] ) -> None

Validate if the provided fields are queryable.

Raises HTTPException if invalid fields are found.