Module stac_fastapi.extensions.core.fields¶
Fields extension module.
Sub-modules¶
Classes¶
FieldsExtension¶
class FieldsExtension(
conformance_classes: List[str] = NOTHING,
schema_href: Optional[str] = None
)
Fields Extension.
The Fields extension adds functionality to the /search
endpoint which
allows the caller to include or exclude specific from the API response.
Registering this extension with the application has the added effect of
removing the ItemCollection
response model from the /search
endpoint, as
the Fields extension allows the API to return potentially invalid responses
by excluding fields which are required by the STAC spec, such as geometry.
Attributes¶
Name | Type | Description | Default |
---|---|---|---|
default_includes | set | defines the default set of included fields. | None |
conformance_classes | list | Defines the list of conformance classes for the extension |
None |
Ancestors (in MRO)¶
- 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 | fastapi.FastAPI | target FastAPI application. | None |
Returns:
Type | Description |
---|---|
None | None |