stac-fastapi.extensions 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_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/PKG-INFO +1 -1
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/collection_search/request.py +20 -9
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/filter/client.py +2 -2
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/filter/request.py +10 -8
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/query/request.py +7 -3
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/sort/request.py +7 -5
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/transaction.py +2 -2
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/version.py +1 -1
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi.extensions.egg-info/PKG-INFO +1 -1
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/README.md +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/setup.cfg +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/setup.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/aggregation/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/aggregation/aggregation.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/aggregation/client.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/aggregation/request.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/aggregation/types.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/collection_search/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/collection_search/client.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/collection_search/collection_search.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/fields/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/fields/fields.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/fields/request.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/filter/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/filter/filter.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/free_text/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/free_text/free_text.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/free_text/request.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/pagination/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/pagination/offset_pagination.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/pagination/pagination.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/pagination/request.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/pagination/token_pagination.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/query/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/query/query.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/sort/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/core/sort/sort.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/third_party/__init__.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/third_party/bulk_transactions.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi.extensions.egg-info/SOURCES.txt +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi.extensions.egg-info/dependency_links.txt +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi.extensions.egg-info/not-zip-safe +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi.extensions.egg-info/requires.txt +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi.extensions.egg-info/top_level.txt +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/tests/test_aggregation.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/tests/test_collection_search.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/tests/test_filter.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/tests/test_free_text.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/tests/test_pagination.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/tests/test_query.py +0 -0
- {stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/tests/test_transaction.py +0 -0
|
@@ -40,21 +40,32 @@ class BaseCollectionSearchPostRequest(BaseModel):
|
|
|
40
40
|
bbox: Optional[BBox] = Field(
|
|
41
41
|
default=None,
|
|
42
42
|
description="Only return items intersecting this bounding box. Mutually exclusive with **intersects**.", # noqa: E501
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
43
|
+
json_schema_extra={
|
|
44
|
+
"examples": [
|
|
45
|
+
# user-provided
|
|
46
|
+
None,
|
|
47
|
+
# Montreal
|
|
48
|
+
"-73.896103,45.364690,-73.413734,45.674283",
|
|
49
|
+
],
|
|
46
50
|
},
|
|
47
51
|
)
|
|
48
52
|
datetime: Optional[str] = Field(
|
|
49
53
|
default=None,
|
|
50
54
|
description="""Only return items that have a temporal property that intersects this value.\n
|
|
51
55
|
Either a date-time or an interval, open or closed. Date and time expressions adhere to RFC 3339. Open intervals are expressed using double-dots.""", # noqa: E501
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
json_schema_extra={
|
|
57
|
+
"examples": [
|
|
58
|
+
# user-provided
|
|
59
|
+
None,
|
|
60
|
+
# single datetime
|
|
61
|
+
"2018-02-12T23:20:50Z",
|
|
62
|
+
# closed inverval
|
|
63
|
+
"2018-02-12T00:00:00Z/2018-03-18T12:31:12Z",
|
|
64
|
+
# open interval FROM
|
|
65
|
+
"2018-02-12T00:00:00Z/..",
|
|
66
|
+
# open interval TO
|
|
67
|
+
"../2018-03-18T12:31:12Z",
|
|
68
|
+
],
|
|
58
69
|
},
|
|
59
70
|
)
|
|
60
71
|
limit: Optional[Limit] = Field(
|
|
@@ -23,7 +23,7 @@ class AsyncBaseFiltersClient(abc.ABC):
|
|
|
23
23
|
https://github.com/radiantearth/stac-api-spec/tree/master/fragments/filter#queryables
|
|
24
24
|
"""
|
|
25
25
|
return {
|
|
26
|
-
"$schema": "https://json-schema.org/draft/
|
|
26
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
27
27
|
"$id": "https://example.org/queryables",
|
|
28
28
|
"type": "object",
|
|
29
29
|
"title": "Queryables for Example STAC API",
|
|
@@ -49,7 +49,7 @@ class BaseFiltersClient(abc.ABC):
|
|
|
49
49
|
https://github.com/stac-api-extensions/filter#queryables
|
|
50
50
|
"""
|
|
51
51
|
return {
|
|
52
|
-
"$schema": "https://json-schema.org/draft/
|
|
52
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
53
53
|
"$id": "https://example.org/queryables",
|
|
54
54
|
"type": "object",
|
|
55
55
|
"title": "Queryables for Example STAC API",
|
|
@@ -51,13 +51,15 @@ class FilterExtensionPostRequest(BaseModel):
|
|
|
51
51
|
"""Filter extension POST request model."""
|
|
52
52
|
|
|
53
53
|
filter_expr: Optional[Dict[str, Any]] = Field(
|
|
54
|
-
|
|
54
|
+
None,
|
|
55
55
|
alias="filter",
|
|
56
56
|
description="A CQL filter expression for filtering items.",
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
57
|
+
json_schema_extra={
|
|
58
|
+
"examples": [
|
|
59
|
+
# user-provided
|
|
60
|
+
None,
|
|
61
|
+
# landsat8-item
|
|
62
|
+
{
|
|
61
63
|
"op": "and",
|
|
62
64
|
"args": [
|
|
63
65
|
{
|
|
@@ -73,16 +75,16 @@ class FilterExtensionPostRequest(BaseModel):
|
|
|
73
75
|
},
|
|
74
76
|
],
|
|
75
77
|
},
|
|
76
|
-
|
|
78
|
+
],
|
|
77
79
|
},
|
|
78
80
|
)
|
|
79
81
|
filter_crs: Optional[str] = Field(
|
|
82
|
+
None,
|
|
80
83
|
alias="filter-crs",
|
|
81
|
-
default=None,
|
|
82
84
|
description="The coordinate reference system (CRS) used by spatial literals in the 'filter' value. Default is `http://www.opengis.net/def/crs/OGC/1.3/CRS84`", # noqa: E501
|
|
83
85
|
)
|
|
84
86
|
filter_lang: Optional[Literal["cql-json", "cql2-json"]] = Field(
|
|
87
|
+
"cql2-json",
|
|
85
88
|
alias="filter-lang",
|
|
86
|
-
default="cql2-json",
|
|
87
89
|
description="The CQL filter encoding that the 'filter' value uses.",
|
|
88
90
|
)
|
|
@@ -32,8 +32,12 @@ class QueryExtensionPostRequest(BaseModel):
|
|
|
32
32
|
query: Optional[Dict[str, Dict[str, Any]]] = Field(
|
|
33
33
|
None,
|
|
34
34
|
description="Allows additional filtering based on the properties of Item objects", # noqa: E501
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
|
|
35
|
+
json_schema_extra={
|
|
36
|
+
"examples": [
|
|
37
|
+
# user-provided
|
|
38
|
+
None,
|
|
39
|
+
# cloudy
|
|
40
|
+
'{"eo:cloud_cover": {"gte": 95}}',
|
|
41
|
+
],
|
|
38
42
|
},
|
|
39
43
|
)
|
|
@@ -40,15 +40,17 @@ class SortExtensionPostRequest(BaseModel):
|
|
|
40
40
|
sortby: Optional[List[PostSortModel]] = Field(
|
|
41
41
|
None,
|
|
42
42
|
description="An array of property (field) names, and direction in form of '{'field': '<property_name>', 'direction':'<direction>'}'", # noqa: E501
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
json_schema_extra={
|
|
44
|
+
"examples": [
|
|
45
|
+
# user-provided
|
|
46
|
+
None,
|
|
47
|
+
# creation-time
|
|
48
|
+
[
|
|
47
49
|
{
|
|
48
50
|
"field": "properties.created",
|
|
49
51
|
"direction": "asc",
|
|
50
52
|
}
|
|
51
53
|
],
|
|
52
|
-
|
|
54
|
+
],
|
|
53
55
|
},
|
|
54
56
|
)
|
|
@@ -7,10 +7,10 @@ import attr
|
|
|
7
7
|
from fastapi import APIRouter, Body, FastAPI
|
|
8
8
|
from stac_pydantic import Collection, Item, ItemCollection
|
|
9
9
|
from stac_pydantic.shared import MimeTypes
|
|
10
|
-
from starlette.responses import
|
|
10
|
+
from starlette.responses import Response
|
|
11
11
|
from typing_extensions import Annotated
|
|
12
12
|
|
|
13
|
-
from stac_fastapi.api.models import CollectionUri, ItemUri
|
|
13
|
+
from stac_fastapi.api.models import CollectionUri, ItemUri, JSONResponse
|
|
14
14
|
from stac_fastapi.api.routes import create_async_endpoint
|
|
15
15
|
from stac_fastapi.types.config import ApiSettings
|
|
16
16
|
from stac_fastapi.types.core import AsyncBaseTransactionsClient, BaseTransactionsClient
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stac_fastapi_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/stac_fastapi/extensions/__init__.py
RENAMED
|
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
|
|
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
|
|
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_extensions-5.2.0 → stac_fastapi_extensions-5.2.1}/tests/test_collection_search.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|