stac-fastapi-core 6.5.0__tar.gz → 6.5.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 (31) hide show
  1. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/PKG-INFO +1 -1
  2. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/core.py +10 -3
  3. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/extensions/collections_search.py +4 -0
  4. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/version.py +1 -1
  5. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi_core.egg-info/PKG-INFO +1 -1
  6. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/README.md +0 -0
  7. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/setup.cfg +0 -0
  8. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/setup.py +0 -0
  9. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/__init__.py +0 -0
  10. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/base_database_logic.py +0 -0
  11. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/base_settings.py +0 -0
  12. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/basic_auth.py +0 -0
  13. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/datetime_utils.py +0 -0
  14. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/extensions/__init__.py +0 -0
  15. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/extensions/aggregation.py +0 -0
  16. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/extensions/fields.py +0 -0
  17. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/extensions/filter.py +0 -0
  18. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/extensions/query.py +0 -0
  19. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/models/__init__.py +0 -0
  20. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/models/links.py +0 -0
  21. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/models/search.py +0 -0
  22. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/rate_limit.py +0 -0
  23. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/route_dependencies.py +0 -0
  24. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/serializers.py +0 -0
  25. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/session.py +0 -0
  26. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi/core/utilities.py +0 -0
  27. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi_core.egg-info/SOURCES.txt +0 -0
  28. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi_core.egg-info/dependency_links.txt +0 -0
  29. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi_core.egg-info/not-zip-safe +0 -0
  30. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi_core.egg-info/requires.txt +0 -0
  31. {stac_fastapi_core-6.5.0 → stac_fastapi_core-6.5.1}/stac_fastapi_core.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stac_fastapi_core
3
- Version: 6.5.0
3
+ Version: 6.5.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
@@ -240,14 +240,16 @@ class CoreClient(AsyncBaseCoreClient):
240
240
 
241
241
  async def all_collections(
242
242
  self,
243
- datetime: Optional[str] = None,
244
243
  limit: Optional[int] = None,
244
+ datetime: Optional[str] = None,
245
245
  fields: Optional[List[str]] = None,
246
246
  sortby: Optional[Union[str, List[str]]] = None,
247
247
  filter_expr: Optional[str] = None,
248
248
  filter_lang: Optional[str] = None,
249
249
  q: Optional[Union[str, List[str]]] = None,
250
250
  query: Optional[str] = None,
251
+ request: Request = None,
252
+ token: Optional[str] = None,
251
253
  **kwargs,
252
254
  ) -> stac_types.Collections:
253
255
  """Read all collections from the database.
@@ -266,7 +268,6 @@ class CoreClient(AsyncBaseCoreClient):
266
268
  Returns:
267
269
  A Collections object containing all the collections in the database and links to various resources.
268
270
  """
269
- request = kwargs["request"]
270
271
  base_url = str(request.base_url)
271
272
 
272
273
  # Get the global limit from environment variable
@@ -298,7 +299,9 @@ class CoreClient(AsyncBaseCoreClient):
298
299
  else:
299
300
  limit = 10
300
301
 
301
- token = request.query_params.get("token")
302
+ # Get token from query params only if not already provided (for GET requests)
303
+ if token is None:
304
+ token = request.query_params.get("token")
302
305
 
303
306
  # Process fields parameter for filtering collection properties
304
307
  includes, excludes = set(), set()
@@ -499,6 +502,10 @@ class CoreClient(AsyncBaseCoreClient):
499
502
  # Pass all parameters from search_request to all_collections
500
503
  return await self.all_collections(
501
504
  limit=search_request.limit if hasattr(search_request, "limit") else None,
505
+ datetime=search_request.datetime
506
+ if hasattr(search_request, "datetime")
507
+ else None,
508
+ token=search_request.token if hasattr(search_request, "token") else None,
502
509
  fields=fields,
503
510
  sortby=sortby,
504
511
  filter_expr=search_request.filter
@@ -18,6 +18,10 @@ class CollectionsSearchRequest(ExtendedSearch):
18
18
  """Extended search model for collections with free text search support."""
19
19
 
20
20
  q: Optional[Union[str, List[str]]] = None
21
+ token: Optional[str] = None
22
+ query: Optional[
23
+ str
24
+ ] = None # Legacy query extension (deprecated but still supported)
21
25
 
22
26
 
23
27
  class CollectionsSearchEndpointExtension(ApiExtension):
@@ -1,2 +1,2 @@
1
1
  """library version."""
2
- __version__ = "6.5.0"
2
+ __version__ = "6.5.1"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: stac-fastapi-core
3
- Version: 6.5.0
3
+ Version: 6.5.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