stac-fastapi-core 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.
- stac_fastapi/core/core.py +1 -1
- stac_fastapi/core/redis_utils.py +5 -37
- stac_fastapi/core/version.py +1 -1
- {stac_fastapi_core-6.7.0.dist-info → stac_fastapi_core-6.7.2.dist-info}/METADATA +1 -1
- {stac_fastapi_core-6.7.0.dist-info → stac_fastapi_core-6.7.2.dist-info}/RECORD +6 -6
- {stac_fastapi_core-6.7.0.dist-info → stac_fastapi_core-6.7.2.dist-info}/WHEEL +0 -0
stac_fastapi/core/core.py
CHANGED
|
@@ -830,7 +830,7 @@ class CoreClient(AsyncBaseCoreClient):
|
|
|
830
830
|
search = await self.database.apply_cql2_filter(search, cql2_filter)
|
|
831
831
|
except Exception as e:
|
|
832
832
|
raise HTTPException(
|
|
833
|
-
status_code=400, detail=f"Error with
|
|
833
|
+
status_code=400, detail=f"Error with cql2 filter: {e}"
|
|
834
834
|
)
|
|
835
835
|
|
|
836
836
|
if hasattr(search_request, "q"):
|
stac_fastapi/core/redis_utils.py
CHANGED
|
@@ -5,7 +5,7 @@ import logging
|
|
|
5
5
|
from typing import List, Optional, Tuple
|
|
6
6
|
from urllib.parse import parse_qs, urlencode, urlparse, urlunparse
|
|
7
7
|
|
|
8
|
-
from pydantic import field_validator
|
|
8
|
+
from pydantic import Field, field_validator
|
|
9
9
|
from pydantic_settings import BaseSettings
|
|
10
10
|
from redis import asyncio as aioredis
|
|
11
11
|
from redis.asyncio.sentinel import Sentinel
|
|
@@ -21,11 +21,11 @@ class RedisSentinelSettings(BaseSettings):
|
|
|
21
21
|
REDIS_SENTINEL_MASTER_NAME: str = "master"
|
|
22
22
|
REDIS_DB: int = 15
|
|
23
23
|
|
|
24
|
-
REDIS_MAX_CONNECTIONS: int =
|
|
24
|
+
REDIS_MAX_CONNECTIONS: Optional[int] = None
|
|
25
25
|
REDIS_RETRY_TIMEOUT: bool = True
|
|
26
26
|
REDIS_DECODE_RESPONSES: bool = True
|
|
27
27
|
REDIS_CLIENT_NAME: str = "stac-fastapi-app"
|
|
28
|
-
REDIS_HEALTH_CHECK_INTERVAL: int = 30
|
|
28
|
+
REDIS_HEALTH_CHECK_INTERVAL: int = Field(default=30, gt=0)
|
|
29
29
|
REDIS_SELF_LINK_TTL: int = 1800
|
|
30
30
|
|
|
31
31
|
@field_validator("REDIS_DB")
|
|
@@ -36,22 +36,6 @@ 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")
|
|
40
|
-
@classmethod
|
|
41
|
-
def validate_max_connections_sentinel(cls, v: int) -> int:
|
|
42
|
-
"""Validate REDIS_MAX_CONNECTIONS is at least 1."""
|
|
43
|
-
if v < 1:
|
|
44
|
-
raise ValueError("REDIS_MAX_CONNECTIONS must be at least 1")
|
|
45
|
-
return v
|
|
46
|
-
|
|
47
|
-
@field_validator("REDIS_HEALTH_CHECK_INTERVAL")
|
|
48
|
-
@classmethod
|
|
49
|
-
def validate_health_check_interval_sentinel(cls, v: int) -> int:
|
|
50
|
-
"""Validate REDIS_HEALTH_CHECK_INTERVAL is not negative integer."""
|
|
51
|
-
if v < 0:
|
|
52
|
-
raise ValueError("REDIS_HEALTH_CHECK_INTERVAL must be a positive integer")
|
|
53
|
-
return v
|
|
54
|
-
|
|
55
39
|
@field_validator("REDIS_SELF_LINK_TTL")
|
|
56
40
|
@classmethod
|
|
57
41
|
def validate_self_link_ttl_sentinel(cls, v: int) -> int:
|
|
@@ -111,11 +95,11 @@ class RedisSettings(BaseSettings):
|
|
|
111
95
|
REDIS_PORT: int = 6379
|
|
112
96
|
REDIS_DB: int = 15
|
|
113
97
|
|
|
114
|
-
REDIS_MAX_CONNECTIONS: int =
|
|
98
|
+
REDIS_MAX_CONNECTIONS: Optional[int] = None
|
|
115
99
|
REDIS_RETRY_TIMEOUT: bool = True
|
|
116
100
|
REDIS_DECODE_RESPONSES: bool = True
|
|
117
101
|
REDIS_CLIENT_NAME: str = "stac-fastapi-app"
|
|
118
|
-
REDIS_HEALTH_CHECK_INTERVAL: int = 30
|
|
102
|
+
REDIS_HEALTH_CHECK_INTERVAL: int = Field(default=30, gt=0)
|
|
119
103
|
REDIS_SELF_LINK_TTL: int = 1800
|
|
120
104
|
|
|
121
105
|
@field_validator("REDIS_PORT")
|
|
@@ -134,22 +118,6 @@ class RedisSettings(BaseSettings):
|
|
|
134
118
|
raise ValueError("REDIS_DB must be a positive integer")
|
|
135
119
|
return v
|
|
136
120
|
|
|
137
|
-
@field_validator("REDIS_MAX_CONNECTIONS")
|
|
138
|
-
@classmethod
|
|
139
|
-
def validate_max_connections_standalone(cls, v: int) -> int:
|
|
140
|
-
"""Validate REDIS_MAX_CONNECTIONS is at least 1."""
|
|
141
|
-
if v < 1:
|
|
142
|
-
raise ValueError("REDIS_MAX_CONNECTIONS must be at least 1")
|
|
143
|
-
return v
|
|
144
|
-
|
|
145
|
-
@field_validator("REDIS_HEALTH_CHECK_INTERVAL")
|
|
146
|
-
@classmethod
|
|
147
|
-
def validate_health_check_interval_standalone(cls, v: int) -> int:
|
|
148
|
-
"""Validate REDIS_HEALTH_CHECK_INTERVAL is not a negative."""
|
|
149
|
-
if v < 0:
|
|
150
|
-
raise ValueError("REDIS_HEALTH_CHECK_INTERVAL must be a positive integer")
|
|
151
|
-
return v
|
|
152
|
-
|
|
153
121
|
@field_validator("REDIS_SELF_LINK_TTL")
|
|
154
122
|
@classmethod
|
|
155
123
|
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.2"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stac_fastapi_core
|
|
3
|
-
Version: 6.7.
|
|
3
|
+
Version: 6.7.2
|
|
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=kI_DP5kxgTWHQ5Y1X7PbhjVMF86v9pt6p9kH_QcmifA,50382
|
|
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=DRbvYWaBZA07d28PWeGOxZr_h6jH6F5cdcdr1ktr8YU,9251
|
|
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=H-rSs9N60FbjJQ3LVCd-stMghJbOR5tE16Afn_nnWVY,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.2.dist-info/METADATA,sha256=2NmMCjA9Pw9CmOVi08Gy2ZEYwDMuud9z4cN8aYhQd2c,3494
|
|
24
|
+
stac_fastapi_core-6.7.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
25
|
+
stac_fastapi_core-6.7.2.dist-info/RECORD,,
|
|
File without changes
|