Skip to content

Module stac_fastapi.pgstac.extensions

pgstac extension customisations.

Sub-modules

Classes

FiltersClient

class FiltersClient(

)

Defines a pattern for implementing the STAC filter extension.

Ancestors (in MRO)

  • stac_fastapi.extensions.core.filter.client.AsyncBaseFiltersClient
  • abc.ABC

Methods

get_queryables

def get_queryables(
    self,
    request: starlette.requests.Request,
    collection_id: Optional[str] = None,
    **kwargs: Any
) -> Dict[str, Any]

Get the queryables available for the given collection_id.

If collection_id is None, returns the intersection of all queryables over all collections. This base implementation returns a blank queryable schema. This is not allowed under OGC CQL but it is allowed by the STAC API Filter Extension github.com/radiantearth/stac-api-spec/tree/master/fragments/filter#queryables

QueryExtension

class QueryExtension(
    conformance_classes: List[str] = NOTHING,
    schema_href: Optional[str] = None
)

Query Extension.

Override the POST request model to add validation against supported fields

Ancestors (in MRO)

  • stac_fastapi.extensions.core.query.query.QueryExtension
  • stac_fastapi.types.extension.ApiExtension
  • abc.ABC

Class variables

GET
POST

Methods

get_request_model

def get_request_model(
    self,
    verb: Optional[str] = 'GET'
) -> Optional[pydantic.main.BaseModel]

Return the request model for the extension.method.

The model can differ based on HTTP verb

register

def register(
    self,
    app: fastapi.applications.FastAPI
) -> None

Register the extension with a FastAPI application.

Parameters:

Name Type Description Default
app None target FastAPI application. None

Returns:

Type Description
None None