stac-fastapi.types 5.2.0__tar.gz → 5.2.1__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.
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/PKG-INFO +1 -1
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/search.py +11 -3
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/version.py +1 -1
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/PKG-INFO +1 -1
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/README.md +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/setup.cfg +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/setup.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/__init__.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/config.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/conformance.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/core.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/errors.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/extension.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/links.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/requests.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/rfc3339.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi/types/stac.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/SOURCES.txt +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/dependency_links.txt +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/not-zip-safe +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/requires.txt +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/top_level.txt +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/tests/test_config.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/tests/test_limit.py +0 -0
- {stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/tests/test_rfc3339.py +0 -0
|
@@ -5,7 +5,7 @@ from datetime import datetime as dt
|
|
|
5
5
|
from typing import Dict, List, Optional, Union
|
|
6
6
|
|
|
7
7
|
import attr
|
|
8
|
-
from fastapi import Query
|
|
8
|
+
from fastapi import HTTPException, Query
|
|
9
9
|
from pydantic import Field, PositiveInt
|
|
10
10
|
from pydantic.functional_validators import AfterValidator
|
|
11
11
|
from stac_pydantic.api import Search
|
|
@@ -34,8 +34,16 @@ def str2list(x: str) -> Optional[List[str]]:
|
|
|
34
34
|
def str2bbox(x: str) -> Optional[BBox]:
|
|
35
35
|
"""Convert string to BBox based on , delimiter."""
|
|
36
36
|
if x:
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
try:
|
|
38
|
+
t = tuple(float(v) for v in x.split(","))
|
|
39
|
+
except ValueError:
|
|
40
|
+
raise HTTPException(status_code=400, detail=f"invalid bbox: {x}")
|
|
41
|
+
|
|
42
|
+
if len(t) not in (4, 6):
|
|
43
|
+
raise HTTPException(
|
|
44
|
+
status_code=400, detail=f"BBox '{x}' must have 4 or 6 values."
|
|
45
|
+
)
|
|
46
|
+
|
|
39
47
|
return t
|
|
40
48
|
|
|
41
49
|
return None
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/requires.txt
RENAMED
|
File without changes
|
{stac_fastapi_types-5.2.0 → stac_fastapi_types-5.2.1}/stac_fastapi.types.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|