Skip to content

Module stac_fastapi.core.queryables

A module for managing queryable attributes.

Functions

get_properties_from_cql2_filter

def get_properties_from_cql2_filter(
    cql2_filter: Dict[str, Any]
) -> Set[str]

Recursively extract property names from a CQL2 filter.

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

Classes

QueryablesCache

class QueryablesCache(
    database_logic: Any
)

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

Methods

get_all_queryables

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

def reload_settings(
    self
)

Reload settings from environment variables.

validate

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

Validate if the provided fields are queryable.

Raises HTTPException if invalid fields are found.