A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/stac-utils/stac-fastapi below:

stac-utils/stac-fastapi: STAC API implementation with FastAPI.

FastAPI implemention of the STAC API spec.

Documentation: https://stac-utils.github.io/stac-fastapi/

Source Code: https://github.com/stac-utils/stac-fastapi

Python library for building a STAC-compliant FastAPI application.

stac-fastapi was initially developed by arturo-ai.

The project contains several namespace packages:

In addition to the packages in this repository, a server implemention will also require the selection of a backend to connect with a database for STAC metadata storage. There are several different backend options, and each has their own repository.

The two most widely-used and supported backends are:

Other implementations include:

Response Model Validation

A common question when using this package is how request and response types are validated?

This package uses stac-pydantic to validate and document STAC objects. However, by default, validation of response types is turned off and the API will simply forward responses without validating them against the Pydantic model first. This decision was made with the assumption that responses usually come from a (typed) database and can be considered safe. Extra validation would only increase latency, in particular for large payloads.

To turn on response validation, set ENABLE_RESPONSE_MODELS to True. Either as an environment variable or directly in the ApiSettings.

With the introduction of Pydantic 2, the extra time it takes to validate models became negatable. While ENABLE_RESPONSE_MODELS still defaults to False there should be no penalty for users to turn on this feature but users discretion is advised.

# Install from PyPI
python -m pip install stac-fastapi.types stac-fastapi.api stac-fastapi.extensions

# Install a backend of your choice
python -m pip install stac-fastapi.pgstac

Other backends may be available from other sources, search PyPI for more.

Install the packages in editable mode:

python -m pip install \
  -e 'stac_fastapi/types[dev]' \
  -e 'stac_fastapi/api[dev]' \
  -e 'stac_fastapi/extensions[dev]'

To run the tests:

See RELEASING.md.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4