A stac-fastapi implementation with a stac-geoparquet backend
Project description
stac-fastapi-geoparquet
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
- Currently, only supports one collection per file (tracking issue: https://github.com/stac-utils/stac-fastapi-geoparquet/issues/27)
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stac_fastapi_geoparquet-0.0.3.tar.gz.
File metadata
- Download URL: stac_fastapi_geoparquet-0.0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
979e8ab4b5818b0443687e3cc6c5e08334852d62035e0aa2f2848014cb693c9a
|
|
| MD5 |
ddb83fc44a8e327da6cedc245b518a78
|
|
| BLAKE2b-256 |
1c997211458284b934d5313b4d61fc204dcc01935140006b409234a06a4300e0
|
Provenance
The following attestation bundles were made for stac_fastapi_geoparquet-0.0.3.tar.gz:
Publisher:
release.yml on stac-utils/stac-fastapi-geoparquet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stac_fastapi_geoparquet-0.0.3.tar.gz -
Subject digest:
979e8ab4b5818b0443687e3cc6c5e08334852d62035e0aa2f2848014cb693c9a - Sigstore transparency entry: 842806309
- Sigstore integration time:
-
Permalink:
stac-utils/stac-fastapi-geoparquet@76e8aa094af3243ea7203f263480c57eff541e4f -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/stac-utils
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@76e8aa094af3243ea7203f263480c57eff541e4f -
Trigger Event:
push
-
Statement type:
File details
Details for the file stac_fastapi_geoparquet-0.0.3-py3-none-any.whl.
File metadata
- Download URL: stac_fastapi_geoparquet-0.0.3-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5c00015550b2b2917fae8ec216a606f905e563378cc2aef698736fbdf18fccf
|
|
| MD5 |
f27494dde99135951093225cc0fe1f33
|
|
| BLAKE2b-256 |
cbdcf76e2d0f2753556719f293859521e0a329c6f9a334ee5212d0e55429d630
|
Provenance
The following attestation bundles were made for stac_fastapi_geoparquet-0.0.3-py3-none-any.whl:
Publisher:
release.yml on stac-utils/stac-fastapi-geoparquet
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stac_fastapi_geoparquet-0.0.3-py3-none-any.whl -
Subject digest:
f5c00015550b2b2917fae8ec216a606f905e563378cc2aef698736fbdf18fccf - Sigstore transparency entry: 842806336
- Sigstore integration time:
-
Permalink:
stac-utils/stac-fastapi-geoparquet@76e8aa094af3243ea7203f263480c57eff541e4f -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/stac-utils
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@76e8aa094af3243ea7203f263480c57eff541e4f -
Trigger Event:
push
-
Statement type: