stac-fastapi-core 6.2.0__tar.gz → 6.2.1__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.
Files changed (30) hide show
  1. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/PKG-INFO +24 -2
  2. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/README.md +1 -0
  3. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/base_database_logic.py +2 -0
  4. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/core.py +7 -4
  5. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/version.py +1 -1
  6. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi_core.egg-info/PKG-INFO +25 -3
  7. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi_core.egg-info/top_level.txt +1 -0
  8. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/setup.cfg +0 -0
  9. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/setup.py +0 -0
  10. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/__init__.py +0 -0
  11. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/base_settings.py +0 -0
  12. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/basic_auth.py +0 -0
  13. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/datetime_utils.py +0 -0
  14. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/extensions/__init__.py +0 -0
  15. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/extensions/aggregation.py +0 -0
  16. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/extensions/fields.py +0 -0
  17. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/extensions/filter.py +0 -0
  18. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/extensions/query.py +0 -0
  19. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/models/__init__.py +0 -0
  20. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/models/links.py +0 -0
  21. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/models/search.py +0 -0
  22. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/rate_limit.py +0 -0
  23. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/route_dependencies.py +0 -0
  24. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/serializers.py +0 -0
  25. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/session.py +0 -0
  26. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi/core/utilities.py +0 -0
  27. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi_core.egg-info/SOURCES.txt +0 -0
  28. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi_core.egg-info/dependency_links.txt +0 -0
  29. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi_core.egg-info/not-zip-safe +0 -0
  30. {stac_fastapi_core-6.2.0 → stac_fastapi_core-6.2.1}/stac_fastapi_core.egg-info/requires.txt +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: stac_fastapi_core
3
- Version: 6.2.0
3
+ Version: 6.2.1
4
4
  Summary: Core library for the Elasticsearch and Opensearch stac-fastapi backends.
5
5
  Home-page: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch
6
6
  License: MIT
@@ -15,6 +15,27 @@ Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: License :: OSI Approved :: MIT License
16
16
  Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
+ Requires-Dist: fastapi~=0.109.0
19
+ Requires-Dist: attrs>=23.2.0
20
+ Requires-Dist: pydantic<3.0.0,>=2.4.1
21
+ Requires-Dist: stac_pydantic~=3.3.0
22
+ Requires-Dist: stac-fastapi.types==6.0.0
23
+ Requires-Dist: stac-fastapi.api==6.0.0
24
+ Requires-Dist: stac-fastapi.extensions==6.0.0
25
+ Requires-Dist: orjson~=3.9.0
26
+ Requires-Dist: overrides~=7.4.0
27
+ Requires-Dist: geojson-pydantic~=1.0.0
28
+ Requires-Dist: pygeofilter~=0.3.1
29
+ Requires-Dist: jsonschema~=4.0.0
30
+ Requires-Dist: slowapi~=0.1.9
31
+ Dynamic: classifier
32
+ Dynamic: description
33
+ Dynamic: description-content-type
34
+ Dynamic: home-page
35
+ Dynamic: license
36
+ Dynamic: requires-dist
37
+ Dynamic: requires-python
38
+ Dynamic: summary
18
39
 
19
40
  # stac-fastapi-elasticsearch-opensearch
20
41
 
@@ -245,6 +266,7 @@ You can customize additional settings in your `.env` file:
245
266
  | `RAISE_ON_BULK_ERROR` | Controls whether bulk insert operations raise exceptions on errors. If set to `true`, the operation will stop and raise an exception when an error occurs. If set to `false`, errors will be logged, and the operation will continue. **Note:** STAC Item and ItemCollection validation errors will always raise, regardless of this flag. | `false` | Optional |
246
267
  | `DATABASE_REFRESH` | Controls whether database operations refresh the index immediately after changes. If set to `true`, changes will be immediately searchable. If set to `false`, changes may not be immediately visible but can improve performance for bulk operations. If set to `wait_for`, changes will wait for the next refresh cycle to become visible. | `false` | Optional |
247
268
  | `ENABLE_TRANSACTIONS_EXTENSIONS` | Enables or disables the Transactions and Bulk Transactions API extensions. If set to `false`, the POST `/collections` route and related transaction endpoints (including bulk transaction operations) will be unavailable in the API. This is useful for deployments where mutating the catalog via the API should be prevented. | `true` | Optional |
269
+ | `STAC_ITEM_LIMIT` | Sets the environment variable for result limiting to SFEOS for the number of returned items and STAC collections. | `10` | Optional |
248
270
 
249
271
  > [!NOTE]
250
272
  > The variables `ES_HOST`, `ES_PORT`, `ES_USE_SSL`, `ES_VERIFY_CERTS` and `ES_TIMEOUT` 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.
@@ -227,6 +227,7 @@ You can customize additional settings in your `.env` file:
227
227
  | `RAISE_ON_BULK_ERROR` | Controls whether bulk insert operations raise exceptions on errors. If set to `true`, the operation will stop and raise an exception when an error occurs. If set to `false`, errors will be logged, and the operation will continue. **Note:** STAC Item and ItemCollection validation errors will always raise, regardless of this flag. | `false` | Optional |
228
228
  | `DATABASE_REFRESH` | Controls whether database operations refresh the index immediately after changes. If set to `true`, changes will be immediately searchable. If set to `false`, changes may not be immediately visible but can improve performance for bulk operations. If set to `wait_for`, changes will wait for the next refresh cycle to become visible. | `false` | Optional |
229
229
  | `ENABLE_TRANSACTIONS_EXTENSIONS` | Enables or disables the Transactions and Bulk Transactions API extensions. If set to `false`, the POST `/collections` route and related transaction endpoints (including bulk transaction operations) will be unavailable in the API. This is useful for deployments where mutating the catalog via the API should be prevented. | `true` | Optional |
230
+ | `STAC_ITEM_LIMIT` | Sets the environment variable for result limiting to SFEOS for the number of returned items and STAC collections. | `10` | Optional |
230
231
 
231
232
  > [!NOTE]
232
233
  > The variables `ES_HOST`, `ES_PORT`, `ES_USE_SSL`, `ES_VERIFY_CERTS` and `ES_TIMEOUT` 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.
@@ -48,6 +48,7 @@ class BaseDatabaseLogic(abc.ABC):
48
48
  item_id: str,
49
49
  operations: List,
50
50
  base_url: str,
51
+ create_nest: bool = False,
51
52
  refresh: bool = True,
52
53
  ) -> Dict:
53
54
  """Patch a item in the database follows RF6902."""
@@ -94,6 +95,7 @@ class BaseDatabaseLogic(abc.ABC):
94
95
  collection_id: str,
95
96
  operations: List,
96
97
  base_url: str,
98
+ create_nest: bool = False,
97
99
  refresh: bool = True,
98
100
  ) -> Dict:
99
101
  """Patch a collection in the database follows RF6902."""
@@ -1,6 +1,7 @@
1
1
  """Core client."""
2
2
 
3
3
  import logging
4
+ import os
4
5
  from datetime import datetime as datetime_type
5
6
  from datetime import timezone
6
7
  from enum import Enum
@@ -234,7 +235,7 @@ class CoreClient(AsyncBaseCoreClient):
234
235
  """
235
236
  request = kwargs["request"]
236
237
  base_url = str(request.base_url)
237
- limit = int(request.query_params.get("limit", 10))
238
+ limit = int(request.query_params.get("limit", os.getenv("STAC_ITEM_LIMIT", 10)))
238
239
  token = request.query_params.get("token")
239
240
 
240
241
  collections, next_token = await self.database.get_all_collections(
@@ -285,7 +286,7 @@ class CoreClient(AsyncBaseCoreClient):
285
286
  collection_id: str,
286
287
  bbox: Optional[BBox] = None,
287
288
  datetime: Optional[str] = None,
288
- limit: Optional[int] = 10,
289
+ limit: Optional[int] = None,
289
290
  token: Optional[str] = None,
290
291
  **kwargs,
291
292
  ) -> stac_types.ItemCollection:
@@ -295,7 +296,7 @@ class CoreClient(AsyncBaseCoreClient):
295
296
  collection_id (str): The identifier of the collection to read items from.
296
297
  bbox (Optional[BBox]): The bounding box to filter items by.
297
298
  datetime (Optional[str]): The datetime range to filter items by.
298
- limit (int): The maximum number of items to return. The default value is 10.
299
+ limit (int): The maximum number of items to return.
299
300
  token (str): A token used for pagination.
300
301
  request (Request): The incoming request.
301
302
 
@@ -341,6 +342,7 @@ class CoreClient(AsyncBaseCoreClient):
341
342
 
342
343
  search = self.database.apply_bbox_filter(search=search, bbox=bbox)
343
344
 
345
+ limit = int(request.query_params.get("limit", os.getenv("STAC_ITEM_LIMIT", 10)))
344
346
  items, maybe_count, next_token = await self.database.execute_search(
345
347
  search=search,
346
348
  limit=limit,
@@ -393,7 +395,7 @@ class CoreClient(AsyncBaseCoreClient):
393
395
  ids: Optional[List[str]] = None,
394
396
  bbox: Optional[BBox] = None,
395
397
  datetime: Optional[str] = None,
396
- limit: Optional[int] = 10,
398
+ limit: Optional[int] = None,
397
399
  query: Optional[str] = None,
398
400
  token: Optional[str] = None,
399
401
  fields: Optional[List[str]] = None,
@@ -426,6 +428,7 @@ class CoreClient(AsyncBaseCoreClient):
426
428
  Raises:
427
429
  HTTPException: If any error occurs while searching the catalog.
428
430
  """
431
+ limit = int(request.query_params.get("limit", os.getenv("STAC_ITEM_LIMIT", 10)))
429
432
  base_args = {
430
433
  "collections": collections,
431
434
  "ids": ids,
@@ -1,2 +1,2 @@
1
1
  """library version."""
2
- __version__ = "6.2.0"
2
+ __version__ = "6.2.1"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
2
- Name: stac-fastapi-core
3
- Version: 6.2.0
1
+ Metadata-Version: 2.4
2
+ Name: stac_fastapi_core
3
+ Version: 6.2.1
4
4
  Summary: Core library for the Elasticsearch and Opensearch stac-fastapi backends.
5
5
  Home-page: https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch
6
6
  License: MIT
@@ -15,6 +15,27 @@ Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: License :: OSI Approved :: MIT License
16
16
  Requires-Python: >=3.9
17
17
  Description-Content-Type: text/markdown
18
+ Requires-Dist: fastapi~=0.109.0
19
+ Requires-Dist: attrs>=23.2.0
20
+ Requires-Dist: pydantic<3.0.0,>=2.4.1
21
+ Requires-Dist: stac_pydantic~=3.3.0
22
+ Requires-Dist: stac-fastapi.types==6.0.0
23
+ Requires-Dist: stac-fastapi.api==6.0.0
24
+ Requires-Dist: stac-fastapi.extensions==6.0.0
25
+ Requires-Dist: orjson~=3.9.0
26
+ Requires-Dist: overrides~=7.4.0
27
+ Requires-Dist: geojson-pydantic~=1.0.0
28
+ Requires-Dist: pygeofilter~=0.3.1
29
+ Requires-Dist: jsonschema~=4.0.0
30
+ Requires-Dist: slowapi~=0.1.9
31
+ Dynamic: classifier
32
+ Dynamic: description
33
+ Dynamic: description-content-type
34
+ Dynamic: home-page
35
+ Dynamic: license
36
+ Dynamic: requires-dist
37
+ Dynamic: requires-python
38
+ Dynamic: summary
18
39
 
19
40
  # stac-fastapi-elasticsearch-opensearch
20
41
 
@@ -245,6 +266,7 @@ You can customize additional settings in your `.env` file:
245
266
  | `RAISE_ON_BULK_ERROR` | Controls whether bulk insert operations raise exceptions on errors. If set to `true`, the operation will stop and raise an exception when an error occurs. If set to `false`, errors will be logged, and the operation will continue. **Note:** STAC Item and ItemCollection validation errors will always raise, regardless of this flag. | `false` | Optional |
246
267
  | `DATABASE_REFRESH` | Controls whether database operations refresh the index immediately after changes. If set to `true`, changes will be immediately searchable. If set to `false`, changes may not be immediately visible but can improve performance for bulk operations. If set to `wait_for`, changes will wait for the next refresh cycle to become visible. | `false` | Optional |
247
268
  | `ENABLE_TRANSACTIONS_EXTENSIONS` | Enables or disables the Transactions and Bulk Transactions API extensions. If set to `false`, the POST `/collections` route and related transaction endpoints (including bulk transaction operations) will be unavailable in the API. This is useful for deployments where mutating the catalog via the API should be prevented. | `true` | Optional |
269
+ | `STAC_ITEM_LIMIT` | Sets the environment variable for result limiting to SFEOS for the number of returned items and STAC collections. | `10` | Optional |
248
270
 
249
271
  > [!NOTE]
250
272
  > The variables `ES_HOST`, `ES_PORT`, `ES_USE_SSL`, `ES_VERIFY_CERTS` and `ES_TIMEOUT` 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.