stac-fastapi-opensearch 4.0.0a1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- stac_fastapi_opensearch-4.0.0a1/PKG-INFO +351 -0
- stac_fastapi_opensearch-4.0.0a1/README.md +330 -0
- stac_fastapi_opensearch-4.0.0a1/setup.cfg +7 -0
- stac_fastapi_opensearch-4.0.0a1/setup.py +56 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi/opensearch/__init__.py +1 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi/opensearch/app.py +143 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi/opensearch/config.py +94 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi/opensearch/database_logic.py +965 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi/opensearch/version.py +2 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi_opensearch.egg-info/PKG-INFO +351 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi_opensearch.egg-info/SOURCES.txt +15 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi_opensearch.egg-info/dependency_links.txt +1 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi_opensearch.egg-info/entry_points.txt +2 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi_opensearch.egg-info/not-zip-safe +1 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi_opensearch.egg-info/requires.txt +22 -0
- stac_fastapi_opensearch-4.0.0a1/stac_fastapi_opensearch.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: stac_fastapi_opensearch
|
|
3
|
+
Version: 4.0.0a1
|
|
4
|
+
Summary: Opensearch stac-fastapi backend.
|
|
5
|
+
Home-page: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Intended Audience :: Developers
|
|
8
|
+
Classifier: Intended Audience :: Information Technology
|
|
9
|
+
Classifier: Intended Audience :: Science/Research
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Provides-Extra: docs
|
|
20
|
+
Provides-Extra: server
|
|
21
|
+
|
|
22
|
+
# stac-fastapi-elasticsearch-opensearch (sfeos)
|
|
23
|
+
|
|
24
|
+
<!-- markdownlint-disable MD033 MD041 -->
|
|
25
|
+
|
|
26
|
+
<p align="left">
|
|
27
|
+
<img src="https://github.com/radiantearth/stac-site/raw/master/images/logo/stac-030-long.png" width=600>
|
|
28
|
+
<p align="left"><b>Elasticsearch and Opensearch backends for the stac-fastapi project.</b></p>
|
|
29
|
+
<p align="left"><b>Featuring stac-fastapi.core for simplifying the creation and maintenance of custom STAC api backends.</b></p>
|
|
30
|
+
</p>
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
[](https://badge.fury.io/py/stac-fastapi-elasticsearch) [](https://badge.fury.io/py/stac-fastapi-opensearch)
|
|
34
|
+
[](https://gitter.im/stac-fastapi-elasticsearch/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
**Online Documentation**: [https://stac-utils.github.io/stac-fastapi-elasticsearch-opensearch](https://stac-utils.github.io/stac-fastapi-elasticsearch-opensearch/)
|
|
40
|
+
|
|
41
|
+
**Source Code**: [https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
### Notes:
|
|
47
|
+
|
|
48
|
+
- Our Api core library can be used to create custom backends. See [stac-fastapi-mongo](https://github.com/Healy-Hyperspatial/stac-fastapi-mongo) for a working example.
|
|
49
|
+
- Reach out on our [Gitter](https://app.gitter.im/#/room/#stac-fastapi-elasticsearch_community:gitter.im) channel or feel free to add to our [Discussions](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/discussions) page here on github.
|
|
50
|
+
- There is [Postman](https://documenter.getpostman.com/view/12888943/2s8ZDSdRHA) documentation here for examples on how to run some of the API routes locally - after starting the elasticsearch backend via the compose.yml file.
|
|
51
|
+
- The `/examples` folder shows an example of running stac-fastapi-elasticsearch from PyPI in docker without needing any code from the repository. There is also a Postman collection here that you can load into Postman for testing the API routes.
|
|
52
|
+
|
|
53
|
+
- For changes, see the [Changelog](CHANGELOG.md)
|
|
54
|
+
- We are always welcoming contributions. For the development notes: [Contributing](CONTRIBUTING.md)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### To install from PyPI:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# For versions 4.0.0a1 and newer (PEP 625 compliant naming):
|
|
61
|
+
pip install stac-fastapi-elasticsearch # Elasticsearch backend
|
|
62
|
+
pip install stac-fastapi-opensearch # Opensearch backend
|
|
63
|
+
pip install stac-fastapi-core # Core library
|
|
64
|
+
|
|
65
|
+
# For versions 4.0.0a0 and older:
|
|
66
|
+
pip install stac-fastapi.elasticsearch # Elasticsearch backend
|
|
67
|
+
pip install stac-fastapi.opensearch # Opensearch backend
|
|
68
|
+
pip install stac-fastapi.core # Core library
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> **Important Note:** Starting with version 4.0.0a1, package names have changed from using periods (e.g., `stac-fastapi.core`) to using hyphens (e.g., `stac-fastapi-core`) to comply with PEP 625. The internal package structure uses underscores, but users should install with hyphens as shown above. Please update your requirements files accordingly.
|
|
72
|
+
|
|
73
|
+
### To install and run via pre-built Docker Images
|
|
74
|
+
|
|
75
|
+
We provide ready-to-use Docker images through GitHub Container Registry ([ElasticSearch](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pkgs/container/stac-fastapi-es) and [OpenSearch](https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch/pkgs/container/stac-fastapi-os) backends). You can easily pull and run these images:
|
|
76
|
+
|
|
77
|
+
```shell
|
|
78
|
+
# For Elasticsearch backend
|
|
79
|
+
docker pull ghcr.io/stac-utils/stac-fastapi-es:latest
|
|
80
|
+
|
|
81
|
+
# For OpenSearch backend
|
|
82
|
+
docker pull ghcr.io/stac-utils/stac-fastapi-os:latest
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Run Elasticsearch API backend on localhost:8080
|
|
86
|
+
|
|
87
|
+
You need to ensure [**Docker Compose**](https://docs.docker.com/compose/install/) or [**Podman Compose**](https://podman-desktop.io/docs/compose) installed and running on your machine. In the following command instead of `docker compose` you can use `podman-compose` as well.
|
|
88
|
+
|
|
89
|
+
```shell
|
|
90
|
+
docker compose up elasticsearch app-elasticsearch
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
By default, Docker Compose uses Elasticsearch 8.x and OpenSearch 2.11.1.
|
|
94
|
+
If you wish to use a different version, put the following in a
|
|
95
|
+
file named `.env` in the same directory you run Docker Compose from:
|
|
96
|
+
|
|
97
|
+
```shell
|
|
98
|
+
ELASTICSEARCH_VERSION=7.17.1
|
|
99
|
+
OPENSEARCH_VERSION=2.11.0
|
|
100
|
+
```
|
|
101
|
+
The most recent Elasticsearch 7.x versions should also work. See the [opensearch-py docs](https://github.com/opensearch-project/opensearch-py/blob/main/COMPATIBILITY.md) for compatibility information.
|
|
102
|
+
|
|
103
|
+
#### **Configuration reference keys:**
|
|
104
|
+
|
|
105
|
+
You can customize additional settings in your `.env` file:
|
|
106
|
+
###### Key variables to configure:
|
|
107
|
+
|
|
108
|
+
| Variable | Description | Default | Required |
|
|
109
|
+
|------------------------------|--------------------------------------------------------------------------------------|--------------------------|---------------------------------------------------------------------------------------------|
|
|
110
|
+
| `ES_HOST` | Hostname for external Elasticsearch/OpenSearch. | `localhost` | Optional |
|
|
111
|
+
| `ES_PORT` | Port for Elasticsearch/OpenSearch. | `9200` (ES) / `9202` (OS)| Optional |
|
|
112
|
+
| `ES_USE_SSL` | Use SSL for connecting to Elasticsearch/OpenSearch. | `false` | Optional |
|
|
113
|
+
| `ES_VERIFY_CERTS` | Verify SSL certificates when connecting. | `false` | Optional |
|
|
114
|
+
| `STAC_FASTAPI_TITLE` | Title of the API in the documentation. | `stac-fastapi-elasticsearch` or `stac-fastapi-opensearch` | Optional |
|
|
115
|
+
| `STAC_FASTAPI_DESCRIPTION` | Description of the API in the documentation. | N/A | Optional |
|
|
116
|
+
| `STAC_FASTAPI_VERSION` | API version. | `2.1` | Optional |
|
|
117
|
+
| `APP_HOST` | Server bind address. | `0.0.0.0` | Optional |
|
|
118
|
+
| `APP_PORT` | Server port. | `8080` | Optional |
|
|
119
|
+
| `ENVIRONMENT` | Runtime environment. | `local` | Optional |
|
|
120
|
+
| `WEB_CONCURRENCY` | Number of worker processes. | `10` | Optional |
|
|
121
|
+
| `RELOAD` | Enable auto-reload for development. | `true` | Optional |
|
|
122
|
+
| `STAC_FASTAPI_RATE_LIMIT` | API rate limit per client. | `200/minute` | Optional |
|
|
123
|
+
| `BACKEND` | Tests-related variable | `elasticsearch` or `opensearch` based on the backend | Optional |
|
|
124
|
+
| `ELASTICSEARCH_VERSION` | ElasticSearch version | `7.17.1` | Optional |
|
|
125
|
+
| `OPENSEARCH_VERSION` | OpenSearch version | `2.11.0` | Optional |
|
|
126
|
+
|
|
127
|
+
> [!NOTE]
|
|
128
|
+
> The variables `ES_HOST`, `ES_PORT`, `ES_USE_SSL`, and `ES_VERIFY_CERTS` apply to both Elasticsearch and OpenSearch backends, so there is no need to rename the key names to `OS_` even if you're using OpenSearch.
|
|
129
|
+
|
|
130
|
+
## Interacting with the API
|
|
131
|
+
|
|
132
|
+
To create a new Collection:
|
|
133
|
+
|
|
134
|
+
```shell
|
|
135
|
+
curl -X "POST" "http://localhost:8080/collections" \
|
|
136
|
+
-H 'Content-Type: application/json; charset=utf-8' \
|
|
137
|
+
-d $'{
|
|
138
|
+
"id": "my_collection"
|
|
139
|
+
}'
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Note: this "Collections Transaction" behavior is not part of the STAC API, but may be soon.
|
|
143
|
+
|
|
144
|
+
## Configure the API
|
|
145
|
+
|
|
146
|
+
By default the API title and description are set to `stac-fastapi-<backend>`. Change the API title and description from the default by setting the `STAC_FASTAPI_TITLE` and `STAC_FASTAPI_DESCRIPTION` environment variables, respectively.
|
|
147
|
+
|
|
148
|
+
By default the API will read from and write to the `collections` and `items_<collection name>` indices. To change the API collections index and the items index prefix, change the `STAC_COLLECTIONS_INDEX` and `STAC_ITEMS_INDEX_PREFIX` environment variables.
|
|
149
|
+
|
|
150
|
+
The application root path is left as the base url by default. If deploying to AWS Lambda with a Gateway API, you will need to define the app root path to be the same as the Gateway API stage name where you will deploy the API. The app root path can be defined with the `STAC_FASTAPI_ROOT_PATH` environment variable (`/v1`, for example)
|
|
151
|
+
|
|
152
|
+
## Collection pagination
|
|
153
|
+
|
|
154
|
+
The collections route handles optional `limit` and `token` parameters. The `links` field that is
|
|
155
|
+
returned from the `/collections` route contains a `next` link with the token that can be used to
|
|
156
|
+
get the next page of results.
|
|
157
|
+
|
|
158
|
+
```shell
|
|
159
|
+
curl -X "GET" "http://localhost:8080/collections?limit=1&token=example_token"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Ingesting Sample Data CLI Tool
|
|
163
|
+
|
|
164
|
+
```shell
|
|
165
|
+
Usage: data_loader.py [OPTIONS]
|
|
166
|
+
|
|
167
|
+
Load STAC items into the database.
|
|
168
|
+
|
|
169
|
+
Options:
|
|
170
|
+
--base-url TEXT Base URL of the STAC API [required]
|
|
171
|
+
--collection-id TEXT ID of the collection to which items are added
|
|
172
|
+
--use-bulk Use bulk insert method for items
|
|
173
|
+
--data-dir PATH Directory containing collection.json and feature
|
|
174
|
+
collection file
|
|
175
|
+
--help Show this message and exit.
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
```shell
|
|
179
|
+
python3 data_loader.py --base-url http://localhost:8080
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
## Elasticsearch Mappings
|
|
184
|
+
|
|
185
|
+
Mappings apply to search index, not source. The mappings are stored in index templates on application startup.
|
|
186
|
+
These templates will be used implicitly when creating new Collection and Item indices.
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
## Managing Elasticsearch Indices
|
|
190
|
+
### Snapshots
|
|
191
|
+
|
|
192
|
+
This section covers how to create a snapshot repository and then create and restore snapshots with this.
|
|
193
|
+
|
|
194
|
+
Create a snapshot repository. This puts the files in the `elasticsearch/snapshots` in this git repo clone, as
|
|
195
|
+
the elasticsearch.yml and compose files create a mapping from that directory to
|
|
196
|
+
`/usr/share/elasticsearch/snapshots` within the Elasticsearch container and grant permissions on using it.
|
|
197
|
+
|
|
198
|
+
```shell
|
|
199
|
+
curl -X "PUT" "http://localhost:9200/_snapshot/my_fs_backup" \
|
|
200
|
+
-H 'Content-Type: application/json; charset=utf-8' \
|
|
201
|
+
-d $'{
|
|
202
|
+
"type": "fs",
|
|
203
|
+
"settings": {
|
|
204
|
+
"location": "/usr/share/elasticsearch/snapshots/my_fs_backup"
|
|
205
|
+
}
|
|
206
|
+
}'
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
The next step is to create a snapshot of one or more indices into this snapshot repository. This command creates
|
|
210
|
+
a snapshot named `my_snapshot_2` and waits for the action to be completed before returning. This can also be done
|
|
211
|
+
asynchronously, and queried for status. The `indices` parameter determines which indices are snapshotted, and
|
|
212
|
+
can include wildcards.
|
|
213
|
+
|
|
214
|
+
```shell
|
|
215
|
+
curl -X "PUT" "http://localhost:9200/_snapshot/my_fs_backup/my_snapshot_2?wait_for_completion=true" \
|
|
216
|
+
-H 'Content-Type: application/json; charset=utf-8' \
|
|
217
|
+
-d $'{
|
|
218
|
+
"metadata": {
|
|
219
|
+
"taken_because": "dump of all items",
|
|
220
|
+
"taken_by": "pvarner"
|
|
221
|
+
},
|
|
222
|
+
"include_global_state": false,
|
|
223
|
+
"ignore_unavailable": false,
|
|
224
|
+
"indices": "items_my-collection"
|
|
225
|
+
}'
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
To see the status of this snapshot:
|
|
229
|
+
|
|
230
|
+
```shell
|
|
231
|
+
curl http://localhost:9200/_snapshot/my_fs_backup/my_snapshot_2
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
To see all the snapshots:
|
|
235
|
+
|
|
236
|
+
```shell
|
|
237
|
+
curl http://localhost:9200/_snapshot/my_fs_backup/_all
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
To restore a snapshot, run something similar to the following. This specific command will restore any indices that
|
|
241
|
+
match `items_*` and rename them so that the new index name will be suffixed with `-copy`.
|
|
242
|
+
|
|
243
|
+
```shell
|
|
244
|
+
curl -X "POST" "http://localhost:9200/_snapshot/my_fs_backup/my_snapshot_2/_restore?wait_for_completion=true" \
|
|
245
|
+
-H 'Content-Type: application/json; charset=utf-8' \
|
|
246
|
+
-d $'{
|
|
247
|
+
"include_aliases": false,
|
|
248
|
+
"include_global_state": false,
|
|
249
|
+
"ignore_unavailable": true,
|
|
250
|
+
"rename_replacement": "items_$1-copy",
|
|
251
|
+
"indices": "items_*",
|
|
252
|
+
"rename_pattern": "items_(.+)"
|
|
253
|
+
}'
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Now the item documents have been restored in to the new index (e.g., `my-collection-copy`), but the value of the
|
|
257
|
+
`collection` field in those documents is still the original value of `my-collection`. To update these to match the
|
|
258
|
+
new collection name, run the following Elasticsearch Update By Query command, substituting the old collection name
|
|
259
|
+
into the term filter and the new collection name into the script parameter:
|
|
260
|
+
|
|
261
|
+
```shell
|
|
262
|
+
curl -X "POST" "http://localhost:9200/items_my-collection-copy/_update_by_query" \
|
|
263
|
+
-H 'Content-Type: application/json; charset=utf-8' \
|
|
264
|
+
-d $'{
|
|
265
|
+
"query": {
|
|
266
|
+
"match_all": {}
|
|
267
|
+
},
|
|
268
|
+
"script": {
|
|
269
|
+
"lang": "painless",
|
|
270
|
+
"params": {
|
|
271
|
+
"collection": "my-collection-copy"
|
|
272
|
+
},
|
|
273
|
+
"source": "ctx._source.collection = params.collection"
|
|
274
|
+
}
|
|
275
|
+
}'
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
Then, create a new collection through the api with the new name for each of the restored indices:
|
|
279
|
+
|
|
280
|
+
```shell
|
|
281
|
+
curl -X "POST" "http://localhost:8080/collections" \
|
|
282
|
+
-H 'Content-Type: application/json' \
|
|
283
|
+
-d $'{
|
|
284
|
+
"id": "my-collection-copy"
|
|
285
|
+
}'
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
Voila! You have a copy of the collection now that has a resource URI (`/collections/my-collection-copy`) and can be
|
|
289
|
+
correctly queried by collection name.
|
|
290
|
+
|
|
291
|
+
### Reindexing
|
|
292
|
+
This section covers how to reindex documents stored in Elasticsearch/OpenSearch.
|
|
293
|
+
A reindex operation might be useful to apply changes to documents or to correct dynamically generated mappings.
|
|
294
|
+
|
|
295
|
+
The index templates will make sure that manually created indices will also have the correct mappings and settings.
|
|
296
|
+
|
|
297
|
+
In this example, we will make a copy of an existing Item index `items_my-collection-lower_my-collection-hex-000001` but change the Item identifier to be lowercase.
|
|
298
|
+
|
|
299
|
+
```shell
|
|
300
|
+
curl -X "POST" "http://localhost:9200/_reindex" \
|
|
301
|
+
-H 'Content-Type: application/json' \
|
|
302
|
+
-d $'{
|
|
303
|
+
"source": {
|
|
304
|
+
"index": "items_my-collection-lower_my-collection-hex-000001"
|
|
305
|
+
},
|
|
306
|
+
"dest": {
|
|
307
|
+
"index": "items_my-collection-lower_my-collection-hex-000002"
|
|
308
|
+
},
|
|
309
|
+
"script": {
|
|
310
|
+
"source": "ctx._source.id = ctx._source.id.toLowerCase()",
|
|
311
|
+
"lang": "painless"
|
|
312
|
+
}
|
|
313
|
+
}'
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
If we are happy with the data in the newly created index, we can move the alias `items_my-collection` to the new index `items_my-collection-lower_my-collection-hex-000002`.
|
|
317
|
+
```shell
|
|
318
|
+
curl -X "POST" "http://localhost:9200/_aliases" \
|
|
319
|
+
-h 'Content-Type: application/json' \
|
|
320
|
+
-d $'{
|
|
321
|
+
"actions": [
|
|
322
|
+
{
|
|
323
|
+
"remove": {
|
|
324
|
+
"index": "*",
|
|
325
|
+
"alias": "items_my-collection"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"add": {
|
|
330
|
+
"index": "items_my-collection-lower_my-collection-hex-000002",
|
|
331
|
+
"alias": "items_my-collection"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
]
|
|
335
|
+
}'
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
The modified Items with lowercase identifiers will now be visible to users accessing `my-collection` in the STAC API.
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
## Auth
|
|
342
|
+
|
|
343
|
+
Authentication is an optional feature that can be enabled through `Route Dependencies` examples can be found and a more detailed explanation in [examples/auth](examples/auth).
|
|
344
|
+
|
|
345
|
+
## Aggregation
|
|
346
|
+
|
|
347
|
+
Aggregation of points and geometries, as well as frequency distribution aggregation of any other property including dates is supported in stac-fatsapi-elasticsearch-opensearch. Aggregations can be defined at the root Catalog level (`/aggregations`) and at the Collection level (`/<collection_id>/aggregations`). Details for supported aggregations can be found in [the aggregation docs](./docs/src/aggregation.md)
|
|
348
|
+
|
|
349
|
+
## Rate Limiting
|
|
350
|
+
|
|
351
|
+
Rate limiting is an optional security feature that controls API request frequency on a remote address basis. It's enabled by setting the `STAC_FASTAPI_RATE_LIMIT` environment variable, e.g., `500/minute`. This limits each client to 500 requests per minute, helping prevent abuse and maintain API stability. Implementation examples are available in the [examples/rate_limit](examples/rate_limit) directory.
|