Skip to main content

A stac-fastapi implementation with a stac-geoparquet backend

Project description

stac-fastapi-geoparquet

GitHub Actions Workflow Status PyPI - Version GitHub License

A stac-fastapi with a stac-geoparquet backend.

stac-fastapi-geoparquet can serve a full-featured STAC API from one or more stac-geoparquet files located (e.g.) in blob storage — no database required.

[!WARNING] 👷 This project is under active development and may change and break at any time.

Usage

To start a STAC API server pointing to a single stac-geoparquet file:

$ python -m pip install 'stac-fastapi-geoparquet[serve]'
$ STAC_FASTAPI_GEOPARQUET_HREF=data/naip.parquet uvicorn stac_fastapi.geoparquet.main:app
INFO:     Started server process [47920]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)

This will start the server on http://127.0.0.1:8000. The collection will be auto-generated from the items in the stac-geoparquet file.

Using collections

Instead of providing the href to a single file, you can provide the href to a file containing a JSON list of collections. Any collection assets with a application/vnd.apache.parquet type field will be added to the server as sources of items. For an example, see data/collections.json.

To start a server with one or more collections:

$ STAC_FASTAPI_COLLECTIONS_HREF=data/collections.json uvicorn stac_fastapi.geoparquet.main:app
INFO:     Started server process [47920]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)

To auto-generate the collections file, we provide a script:

scripts/generate-collections s3://my-bucket/a.parquet s3://my-bucket/b.parquet

This will update ./data/collections.json.

Limitations

Development

Get uv, then:

git clone git@github.com:stac-utils/stac-fastapi-geoparquet.git
cd stac-fastapi-geoparquet
uv sync

To run the tests:

uv run pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stac_fastapi_geoparquet-0.0.4.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stac_fastapi_geoparquet-0.0.4-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file stac_fastapi_geoparquet-0.0.4.tar.gz.

File metadata

  • Download URL: stac_fastapi_geoparquet-0.0.4.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stac_fastapi_geoparquet-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6c040856925caaa1fb3288d2b9dbd4db776b5354f613aa871a3082efa016be0a
MD5 d50a15cdcafc9845238ab4b80df0a3d0
BLAKE2b-256 a7453d6cdc62ef3d274572e8187c97af4de6db048c5360921faad767fe8eaaa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for stac_fastapi_geoparquet-0.0.4.tar.gz:

Publisher: release.yml on stac-utils/stac-fastapi-geoparquet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stac_fastapi_geoparquet-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for stac_fastapi_geoparquet-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 dc511e3c41323ece60863526d9b28db02b8c682c50916452d1dfdd8cfca0e197
MD5 fe88f63eb7b2d0d40a9d3e46ba7268ae
BLAKE2b-256 c4846469aacd1ed0fdfe3c383cf0c0f11e25e889e5f0e8e3a5c3518adb70b0f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for stac_fastapi_geoparquet-0.0.4-py3-none-any.whl:

Publisher: release.yml on stac-utils/stac-fastapi-geoparquet

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page