stac-fastapi-core 6.7.2__py3-none-any.whl → 6.7.3__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 +20 -14
- stac_fastapi/core/redis_utils.py +16 -0
- stac_fastapi/core/version.py +1 -1
- {stac_fastapi_core-6.7.2.dist-info → stac_fastapi_core-6.7.3.dist-info}/METADATA +1 -1
- {stac_fastapi_core-6.7.2.dist-info → stac_fastapi_core-6.7.3.dist-info}/RECORD +6 -6
- {stac_fastapi_core-6.7.2.dist-info → stac_fastapi_core-6.7.3.dist-info}/WHEEL +0 -0
stac_fastapi/core/core.py
CHANGED
|
@@ -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
|
{
|
stac_fastapi/core/redis_utils.py
CHANGED
|
@@ -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:
|
stac_fastapi/core/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"""library version."""
|
|
2
|
-
__version__ = "6.7.
|
|
2
|
+
__version__ = "6.7.3"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stac_fastapi_core
|
|
3
|
-
Version: 6.7.
|
|
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
|
|
@@ -2,15 +2,15 @@ stac_fastapi/core/__init__.py,sha256=8izV3IWRGdXmDOK1hIPQAanbWs9EI04PJCGgqG1ZGIs
|
|
|
2
2
|
stac_fastapi/core/base_database_logic.py,sha256=3_XJ_j06ogQHE-Tcjkv5Vye_zNDn9OEU9lNYU03am1k,4618
|
|
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=
|
|
5
|
+
stac_fastapi/core/core.py,sha256=mmUP1da46EiON_TM2HYtxQxw8DHFg-2xEFoSg4P7UgU,50607
|
|
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
|
-
stac_fastapi/core/redis_utils.py,sha256=
|
|
8
|
+
stac_fastapi/core/redis_utils.py,sha256=ckfuIjOUk08ofG1ql1eGXcOPG60odzSA86rXGr6h_QA,9859
|
|
9
9
|
stac_fastapi/core/route_dependencies.py,sha256=hdtuMkv-zY1vg0YxiCz1aKP0SbBcORqDGEKDGgEazW8,5482
|
|
10
10
|
stac_fastapi/core/serializers.py,sha256=ZW5hPgq-mftk6zxJeZGur-1Qxn7YGc3fJYFLsd-SYwM,7619
|
|
11
11
|
stac_fastapi/core/session.py,sha256=aXqu4LXfVbAAsChMVXd9gAhczA2bZPne6HqPeklAwMY,474
|
|
12
12
|
stac_fastapi/core/utilities.py,sha256=xXWO5oJCNDi7_C5jPYlHZD0B-DL-FN66eEUBUSW-cXw,7296
|
|
13
|
-
stac_fastapi/core/version.py,sha256=
|
|
13
|
+
stac_fastapi/core/version.py,sha256=xoqSv7gsqOZ-kd6XSuIGAoUwK4exieNAmUhNJv2SkHs,45
|
|
14
14
|
stac_fastapi/core/extensions/__init__.py,sha256=zSIAqou8jnakWPbkh4Ddcx1-oazZVBOs7U2PAakAdU0,291
|
|
15
15
|
stac_fastapi/core/extensions/aggregation.py,sha256=v1hUHqlYuMqfQ554g3cTp16pUyRYucQxPERbHPAFtf8,1878
|
|
16
16
|
stac_fastapi/core/extensions/collections_search.py,sha256=xpv51nffMq5a8grNSaLbv2IzeI5JH_pqcoWRbWhzn6Y,14406
|
|
@@ -20,6 +20,6 @@ stac_fastapi/core/extensions/query.py,sha256=Xmo8pfZEZKPudZEjjozv3R0wLOP0ayjC9E6
|
|
|
20
20
|
stac_fastapi/core/models/__init__.py,sha256=g-D1DiGfmC9Bg27DW9JzkN6fAvscv75wyhyiZ6NzvIk,48
|
|
21
21
|
stac_fastapi/core/models/links.py,sha256=0dWSEMt3aa7NCISlHwo11zLBeIV1LwXG3JGjrXC3dZI,6672
|
|
22
22
|
stac_fastapi/core/models/search.py,sha256=7SgAUyzHGXBXSqB4G6cwq9FMwoAS00momb7jvBkjyow,27
|
|
23
|
-
stac_fastapi_core-6.7.
|
|
24
|
-
stac_fastapi_core-6.7.
|
|
25
|
-
stac_fastapi_core-6.7.
|
|
23
|
+
stac_fastapi_core-6.7.3.dist-info/METADATA,sha256=7KV0QP5pjo-ilxLyJ3md7wOj67kWW7N2E3jsIf6yPVw,3494
|
|
24
|
+
stac_fastapi_core-6.7.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
25
|
+
stac_fastapi_core-6.7.3.dist-info/RECORD,,
|
|
File without changes
|