stac-fastapi-core 6.7.1__tar.gz → 6.7.3__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 (27) hide show
  1. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/PKG-INFO +1 -1
  2. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/core.py +21 -15
  3. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/redis_utils.py +16 -0
  4. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/version.py +1 -1
  5. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/.gitignore +0 -0
  6. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/README.md +0 -0
  7. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/pyproject.toml +0 -0
  8. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/pytest.ini +0 -0
  9. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/__init__.py +0 -0
  10. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/base_database_logic.py +0 -0
  11. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/base_settings.py +0 -0
  12. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/basic_auth.py +0 -0
  13. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/datetime_utils.py +0 -0
  14. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/extensions/__init__.py +0 -0
  15. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/extensions/aggregation.py +0 -0
  16. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/extensions/collections_search.py +0 -0
  17. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/extensions/fields.py +0 -0
  18. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/extensions/filter.py +0 -0
  19. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/extensions/query.py +0 -0
  20. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/models/__init__.py +0 -0
  21. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/models/links.py +0 -0
  22. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/models/search.py +0 -0
  23. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/rate_limit.py +0 -0
  24. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/route_dependencies.py +0 -0
  25. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/serializers.py +0 -0
  26. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/session.py +0 -0
  27. {stac_fastapi_core-6.7.1 → stac_fastapi_core-6.7.3}/stac_fastapi/core/utilities.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stac_fastapi_core
3
- Version: 6.7.1
3
+ Version: 6.7.3
4
4
  Summary: Core 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
@@ -137,20 +137,6 @@ class CoreClient(AsyncBaseCoreClient):
137
137
  "href": urljoin(base_url, "search"),
138
138
  "method": "POST",
139
139
  },
140
- {
141
- "rel": "collections-search",
142
- "type": "application/json",
143
- "title": "Collections Search",
144
- "href": urljoin(base_url, "collections-search"),
145
- "method": "GET",
146
- },
147
- {
148
- "rel": "collections-search",
149
- "type": "application/json",
150
- "title": "Collections Search",
151
- "href": urljoin(base_url, "collections-search"),
152
- "method": "POST",
153
- },
154
140
  ],
155
141
  stac_extensions=extension_schemas,
156
142
  )
@@ -202,6 +188,26 @@ class CoreClient(AsyncBaseCoreClient):
202
188
  ]
203
189
  )
204
190
 
191
+ if self.extension_is_enabled("CollectionsSearchEndpointExtension"):
192
+ landing_page["links"].extend(
193
+ [
194
+ {
195
+ "rel": "collections-search",
196
+ "type": "application/json",
197
+ "title": "Collections Search",
198
+ "href": urljoin(base_url, "collections-search"),
199
+ "method": "GET",
200
+ },
201
+ {
202
+ "rel": "collections-search",
203
+ "type": "application/json",
204
+ "title": "Collections Search",
205
+ "href": urljoin(base_url, "collections-search"),
206
+ "method": "POST",
207
+ },
208
+ ]
209
+ )
210
+
205
211
  # Add OpenAPI URL
206
212
  landing_page["links"].append(
207
213
  {
@@ -830,7 +836,7 @@ class CoreClient(AsyncBaseCoreClient):
830
836
  search = await self.database.apply_cql2_filter(search, cql2_filter)
831
837
  except Exception as e:
832
838
  raise HTTPException(
833
- status_code=400, detail=f"Error with cql2_json filter: {e}"
839
+ status_code=400, detail=f"Error with cql2 filter: {e}"
834
840
  )
835
841
 
836
842
  if hasattr(search_request, "q"):
@@ -36,6 +36,14 @@ class RedisSentinelSettings(BaseSettings):
36
36
  raise ValueError("REDIS_DB must be a positive integer")
37
37
  return v
38
38
 
39
+ @field_validator("REDIS_MAX_CONNECTIONS", mode="before")
40
+ @classmethod
41
+ def validate_max_connections(cls, v):
42
+ """Handle empty/None values for REDIS_MAX_CONNECTIONS."""
43
+ if v in ["", "null", "Null", "NULL", "none", "None", "NONE", None]:
44
+ return None
45
+ return v
46
+
39
47
  @field_validator("REDIS_SELF_LINK_TTL")
40
48
  @classmethod
41
49
  def validate_self_link_ttl_sentinel(cls, v: int) -> int:
@@ -118,6 +126,14 @@ class RedisSettings(BaseSettings):
118
126
  raise ValueError("REDIS_DB must be a positive integer")
119
127
  return v
120
128
 
129
+ @field_validator("REDIS_MAX_CONNECTIONS", mode="before")
130
+ @classmethod
131
+ def validate_max_connections(cls, v):
132
+ """Handle empty/None values for REDIS_MAX_CONNECTIONS."""
133
+ if v in ["", "null", "Null", "NULL", "none", "None", "NONE", None]:
134
+ return None
135
+ return v
136
+
121
137
  @field_validator("REDIS_SELF_LINK_TTL")
122
138
  @classmethod
123
139
  def validate_self_link_ttl_standalone(cls, v: int) -> int:
@@ -1,2 +1,2 @@
1
1
  """library version."""
2
- __version__ = "6.7.1"
2
+ __version__ = "6.7.3"