sfeos-helpers 6.7.0__py3-none-any.whl → 6.7.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sfeos_helpers
3
- Version: 6.7.0
3
+ Version: 6.7.2
4
4
  Summary: Helper library for the Elasticsearch and Opensearch stac-fastapi backends.
5
5
  Project-URL: Homepage, https://github.com/stac-utils/stac-fastapi-elasticsearch-opensearch
6
6
  License: MIT
@@ -16,7 +16,7 @@ Classifier: Programming Language :: Python :: 3.12
16
16
  Classifier: Programming Language :: Python :: 3.13
17
17
  Classifier: Programming Language :: Python :: 3.14
18
18
  Requires-Python: >=3.9
19
- Requires-Dist: stac-fastapi-core==6.7.0
19
+ Requires-Dist: stac-fastapi-core==6.7.2
20
20
  Description-Content-Type: text/markdown
21
21
 
22
22
  # sfeos-helpers
@@ -1,5 +1,5 @@
1
1
  stac_fastapi/sfeos_helpers/mappings.py,sha256=IqYd0tQUG-FnWVg6Fp1MU9audntF_-pMGm-BUTGbZMM,8596
2
- stac_fastapi/sfeos_helpers/version.py,sha256=GMc7YzxyWeUVpr_RMVlweeoH2lCLxOWemF-FOkqKXx8,45
2
+ stac_fastapi/sfeos_helpers/version.py,sha256=H-rSs9N60FbjJQ3LVCd-stMghJbOR5tE16Afn_nnWVY,45
3
3
  stac_fastapi/sfeos_helpers/aggregation/README.md,sha256=SDlvCOpKyaJrlJvx84T2RzCnGALe_PK51zNeo3RP9ac,2122
4
4
  stac_fastapi/sfeos_helpers/aggregation/__init__.py,sha256=Mym17lFh90by1GnoQgMyIKAqRNJnvCgVSXDYzjBiPQk,1210
5
5
  stac_fastapi/sfeos_helpers/aggregation/client.py,sha256=PPUk0kAZnms46FlLGrR5w8wa52vG-dT6BG37896R5CY,17939
@@ -16,7 +16,7 @@ stac_fastapi/sfeos_helpers/filter/README.md,sha256=Rb5qHmDkI-7-o3I82Lb_zfmrviqUj
16
16
  stac_fastapi/sfeos_helpers/filter/__init__.py,sha256=n3zL_MhEGOoxMz1KeijyK_UKiZ0MKPl90zHtYI5RAy8,1557
17
17
  stac_fastapi/sfeos_helpers/filter/client.py,sha256=QZP0Dm_T7SoMdR65IOjFmKBW7Rphr4z2xPgozZ93TPs,5339
18
18
  stac_fastapi/sfeos_helpers/filter/cql2.py,sha256=Cg9kRYD9CVkVSyRqOyB5oVXmlyteSn2bw88sqklGpUM,955
19
- stac_fastapi/sfeos_helpers/filter/transform.py,sha256=1GEWQSp-rbq7_1nDVv1ApDbWxt8DswJWxwaxzV85gj4,4644
19
+ stac_fastapi/sfeos_helpers/filter/transform.py,sha256=-hslJ1MUNssEnaMyTknVUMCbaTnR--yvkd4D2CmUEr4,5171
20
20
  stac_fastapi/sfeos_helpers/models/patch.py,sha256=s5n85ktnH6M2SMqpqyItR8uLxliXmnSTg1WO0QLVsmI,3127
21
21
  stac_fastapi/sfeos_helpers/search_engine/__init__.py,sha256=Bi0cAtul3FuLjFceTPtEcaWNBfmUX5vKaqDvbSUAm0o,754
22
22
  stac_fastapi/sfeos_helpers/search_engine/base.py,sha256=9KOLW3NjW9PzWQzqLuhIjQU7FOHdDnB3ZNwDq469JZU,1400
@@ -29,6 +29,6 @@ stac_fastapi/sfeos_helpers/search_engine/selection/base.py,sha256=106c4FK50cgMmT
29
29
  stac_fastapi/sfeos_helpers/search_engine/selection/cache_manager.py,sha256=5yrgf9JA4mgRNMPDKih6xySF8mD724lEWnXhWud7m2c,4039
30
30
  stac_fastapi/sfeos_helpers/search_engine/selection/factory.py,sha256=vbgNVCUW2lviePqzpgsPLxp6IEqcX3GHiahqN2oVObA,1305
31
31
  stac_fastapi/sfeos_helpers/search_engine/selection/selectors.py,sha256=q83nfCfNfLUqtkHpORwNHNRU9Pa-heeaDIPO0RlHb-8,4779
32
- sfeos_helpers-6.7.0.dist-info/METADATA,sha256=GHCTNfc1-AdmRtby5GAqUQMmB56qyZdhRpGudb63mp4,3214
33
- sfeos_helpers-6.7.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
34
- sfeos_helpers-6.7.0.dist-info/RECORD,,
32
+ sfeos_helpers-6.7.2.dist-info/METADATA,sha256=WZaViq6RdY19yJ75aB6DTX1FnccC2Dera1h_Uj-GEtA,3214
33
+ sfeos_helpers-6.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
34
+ sfeos_helpers-6.7.2.dist-info/RECORD,,
@@ -92,7 +92,19 @@ def to_es(queryables_mapping: Dict[str, Any], query: Dict[str, Any]) -> Dict[str
92
92
 
93
93
  elif query["op"] == AdvancedComparisonOp.BETWEEN:
94
94
  field = to_es_field(queryables_mapping, query["args"][0]["property"])
95
- gte, lte = query["args"][1], query["args"][2]
95
+
96
+ # Handle both formats: [property, [lower, upper]] or [property, lower, upper]
97
+ if len(query["args"]) == 2 and isinstance(query["args"][1], list):
98
+ # Format: [{'property': '...'}, [lower, upper]]
99
+ gte, lte = query["args"][1][0], query["args"][1][1]
100
+ elif len(query["args"]) == 3:
101
+ # Format: [{'property': '...'}, lower, upper]
102
+ gte, lte = query["args"][1], query["args"][2]
103
+ else:
104
+ raise ValueError(
105
+ f"BETWEEN operator expects 2 or 3 args, got {len(query['args'])}"
106
+ )
107
+
96
108
  if isinstance(gte, dict) and "timestamp" in gte:
97
109
  gte = gte["timestamp"]
98
110
  if isinstance(lte, dict) and "timestamp" in lte:
@@ -1,2 +1,2 @@
1
1
  """library version."""
2
- __version__ = "6.7.0"
2
+ __version__ = "6.7.2"