stac-fastapi-core 6.5.0__py3-none-any.whl → 6.5.1__py3-none-any.whl

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/core/core.py CHANGED
@@ -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
@@ -2,24 +2,24 @@ stac_fastapi/core/__init__.py,sha256=8izV3IWRGdXmDOK1hIPQAanbWs9EI04PJCGgqG1ZGIs
2
2
  stac_fastapi/core/base_database_logic.py,sha256=nhj0CZNur_SRs4GtXTER-Zjq8JPub5zINiCKbCjw0Bs,3814
3
3
  stac_fastapi/core/base_settings.py,sha256=R3_Sx7n5XpGMs3zAwFJD7y008WvGU_uI2xkaabm82Kg,239
4
4
  stac_fastapi/core/basic_auth.py,sha256=RhFv3RVSHF6OaqnaaU2DO4ncJ_S5nB1q8UNpnVJJsrk,2155
5
- stac_fastapi/core/core.py,sha256=8eGoIcEZVh-4JGZ9PSrY-e8ypEqfmIBxk_napP1HRL4,48014
5
+ stac_fastapi/core/core.py,sha256=D_TUtcPnLKWDLnY-oPw5jsmqoA2ghLqPPs6H56c4myc,48369
6
6
  stac_fastapi/core/datetime_utils.py,sha256=TrTgbU7AKNC-ic4a3HptfE5XAc9tHR7uJasZyhOuwnc,2633
7
7
  stac_fastapi/core/rate_limit.py,sha256=Gu8dAaJReGsj1L91U6m2tflU6RahpXDRs2-AYSKoybA,1318
8
8
  stac_fastapi/core/route_dependencies.py,sha256=hdtuMkv-zY1vg0YxiCz1aKP0SbBcORqDGEKDGgEazW8,5482
9
9
  stac_fastapi/core/serializers.py,sha256=HU7sVSMa6w_F_qs_gdAeIFZ18GW-6t8ZHFmgI4-1uNw,7455
10
10
  stac_fastapi/core/session.py,sha256=aXqu4LXfVbAAsChMVXd9gAhczA2bZPne6HqPeklAwMY,474
11
11
  stac_fastapi/core/utilities.py,sha256=WbspaJey_Cs-7TrBKasdqq7yjB7vjKiU01KyJM0m8_E,7506
12
- stac_fastapi/core/version.py,sha256=KQjuGSR03-CXgF6wsaZ8qsni161S2BjhOn3wTX8JAMw,45
12
+ stac_fastapi/core/version.py,sha256=FuGC3fKnAmD4Wk95swJ6qCVBs5mZiShrlRKuSH-voyE,45
13
13
  stac_fastapi/core/extensions/__init__.py,sha256=zSIAqou8jnakWPbkh4Ddcx1-oazZVBOs7U2PAakAdU0,291
14
14
  stac_fastapi/core/extensions/aggregation.py,sha256=v1hUHqlYuMqfQ554g3cTp16pUyRYucQxPERbHPAFtf8,1878
15
- stac_fastapi/core/extensions/collections_search.py,sha256=bneJQuu-OIsW5P0IbfL6Wz-iowSdAmyz6C0X6vzMn9M,6366
15
+ stac_fastapi/core/extensions/collections_search.py,sha256=q7eRBykEqNRCiTfkmM_TobqKkxA3n1zQ7dYo37juE6s,6503
16
16
  stac_fastapi/core/extensions/fields.py,sha256=NCT5XHvfaf297eDPNaIFsIzvJnbbUTpScqF0otdx0NA,1066
17
17
  stac_fastapi/core/extensions/filter.py,sha256=-NQGME7rR_ereuDx-LAa1M5JhEXFaKiTtkH2asraYHE,2998
18
18
  stac_fastapi/core/extensions/query.py,sha256=Xmo8pfZEZKPudZEjjozv3R0wLOP0ayjC9E67sBOXqWY,1803
19
19
  stac_fastapi/core/models/__init__.py,sha256=g-D1DiGfmC9Bg27DW9JzkN6fAvscv75wyhyiZ6NzvIk,48
20
20
  stac_fastapi/core/models/links.py,sha256=0dWSEMt3aa7NCISlHwo11zLBeIV1LwXG3JGjrXC3dZI,6672
21
21
  stac_fastapi/core/models/search.py,sha256=7SgAUyzHGXBXSqB4G6cwq9FMwoAS00momb7jvBkjyow,27
22
- stac_fastapi_core-6.5.0.dist-info/METADATA,sha256=bTSmvE848AqW76bda8EzNHRORPTXp08pcig6HdGw7ZI,41746
23
- stac_fastapi_core-6.5.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
24
- stac_fastapi_core-6.5.0.dist-info/top_level.txt,sha256=vqn-D9-HsRPTTxy0Vk_KkDmTiMES4owwBQ3ydSZYb2s,13
25
- stac_fastapi_core-6.5.0.dist-info/RECORD,,
22
+ stac_fastapi_core-6.5.1.dist-info/METADATA,sha256=PIBVPUY1dqhKMj_JDMOUYuyLoSa8mDoLuUpfI_sjKcU,41746
23
+ stac_fastapi_core-6.5.1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
24
+ stac_fastapi_core-6.5.1.dist-info/top_level.txt,sha256=vqn-D9-HsRPTTxy0Vk_KkDmTiMES4owwBQ3ydSZYb2s,13
25
+ stac_fastapi_core-6.5.1.dist-info/RECORD,,