stac-fastapi.api 6.1.5__tar.gz → 6.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_api-6.1.5 → stac_fastapi_api-6.2.1}/PKG-INFO +3 -5
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/pyproject.toml +2 -4
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/app.py +10 -2
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/middleware.py +16 -7
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/version.py +1 -1
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/.gitignore +0 -0
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/README.md +0 -0
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/__init__.py +0 -0
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/config.py +0 -0
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/errors.py +0 -0
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/models.py +0 -0
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/openapi.py +0 -0
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/py.typed +0 -0
- {stac_fastapi_api-6.1.5 → stac_fastapi_api-6.2.1}/stac_fastapi/api/routes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stac-fastapi-api
|
|
3
|
-
Version: 6.1
|
|
3
|
+
Version: 6.2.1
|
|
4
4
|
Summary: An implementation of STAC API based on the FastAPI framework.
|
|
5
5
|
Project-URL: Homepage, https://github.com/stac-utils/stac-fastapi
|
|
6
6
|
Author-email: ArturoAI <engineering@arturo.ai>
|
|
@@ -11,12 +11,10 @@ Classifier: Intended Audience :: Developers
|
|
|
11
11
|
Classifier: Intended Audience :: Information Technology
|
|
12
12
|
Classifier: Intended Audience :: Science/Research
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
16
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
18
16
|
Classifier: Programming Language :: Python :: 3.13
|
|
19
17
|
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.11
|
|
21
19
|
Requires-Dist: brotli-asgi
|
|
22
|
-
Requires-Dist: stac-fastapi-types~=6.
|
|
20
|
+
Requires-Dist: stac-fastapi-types~=6.2
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name = "stac-fastapi-api"
|
|
3
3
|
description = "An implementation of STAC API based on the FastAPI framework."
|
|
4
4
|
readme = "README.md"
|
|
5
|
-
requires-python = ">=3.
|
|
5
|
+
requires-python = ">=3.11"
|
|
6
6
|
license = "MIT"
|
|
7
7
|
authors = [
|
|
8
8
|
{ name = "ArturoAI", email = "engineering@arturo.ai" },
|
|
@@ -23,8 +23,6 @@ classifiers = [
|
|
|
23
23
|
"Intended Audience :: Developers",
|
|
24
24
|
"Intended Audience :: Information Technology",
|
|
25
25
|
"Intended Audience :: Science/Research",
|
|
26
|
-
"Programming Language :: Python :: 3.9",
|
|
27
|
-
"Programming Language :: Python :: 3.10",
|
|
28
26
|
"Programming Language :: Python :: 3.11",
|
|
29
27
|
"Programming Language :: Python :: 3.12",
|
|
30
28
|
"Programming Language :: Python :: 3.13",
|
|
@@ -34,7 +32,7 @@ classifiers = [
|
|
|
34
32
|
dynamic = ["version"]
|
|
35
33
|
dependencies = [
|
|
36
34
|
"brotli_asgi",
|
|
37
|
-
"stac-fastapi.types~=6.
|
|
35
|
+
"stac-fastapi.types~=6.2",
|
|
38
36
|
]
|
|
39
37
|
|
|
40
38
|
[dependency-groups]
|
|
@@ -13,10 +13,11 @@ from stac_pydantic import api
|
|
|
13
13
|
from stac_pydantic.shared import MimeTypes
|
|
14
14
|
from stac_pydantic.version import STAC_VERSION
|
|
15
15
|
from starlette.middleware import Middleware
|
|
16
|
+
from starlette.middleware.cors import CORSMiddleware
|
|
16
17
|
from starlette.responses import Response
|
|
17
18
|
|
|
18
19
|
from stac_fastapi.api.errors import DEFAULT_STATUS_CODES, add_exception_handlers
|
|
19
|
-
from stac_fastapi.api.middleware import
|
|
20
|
+
from stac_fastapi.api.middleware import ProxyHeaderMiddleware
|
|
20
21
|
from stac_fastapi.api.models import (
|
|
21
22
|
APIRequest,
|
|
22
23
|
CollectionUri,
|
|
@@ -126,7 +127,14 @@ class StacApi:
|
|
|
126
127
|
default=attr.Factory(
|
|
127
128
|
lambda: [
|
|
128
129
|
Middleware(BrotliMiddleware),
|
|
129
|
-
Middleware(
|
|
130
|
+
Middleware(
|
|
131
|
+
CORSMiddleware,
|
|
132
|
+
# Set CORS defaults to those recommended by the STAC API spec
|
|
133
|
+
allow_origins=["*"],
|
|
134
|
+
allow_methods=["OPTIONS", "POST", "GET"],
|
|
135
|
+
allow_headers=["Content-Type"],
|
|
136
|
+
max_age=600,
|
|
137
|
+
),
|
|
130
138
|
Middleware(ProxyHeaderMiddleware),
|
|
131
139
|
]
|
|
132
140
|
)
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import contextlib
|
|
4
4
|
import re
|
|
5
5
|
import typing
|
|
6
|
+
import warnings
|
|
6
7
|
from http.client import HTTP_PORT, HTTPS_PORT
|
|
7
8
|
from typing import List, Optional, Tuple
|
|
8
9
|
|
|
@@ -31,17 +32,25 @@ class CORSMiddleware(_CORSMiddleware):
|
|
|
31
32
|
allow_origin_regex: typing.Optional[str] = None,
|
|
32
33
|
expose_headers: typing.Sequence[str] = (),
|
|
33
34
|
max_age: int = 600,
|
|
35
|
+
**kwargs: typing.Any,
|
|
34
36
|
) -> None:
|
|
35
37
|
"""Create CORS middleware."""
|
|
38
|
+
warnings.warn(
|
|
39
|
+
"""stac_fastapi.api.middleware.CORSMiddleware is deprecated and
|
|
40
|
+
will be removed in a future release.
|
|
41
|
+
Please use starlette.middleware.cors.CORSMiddleware instead.""",
|
|
42
|
+
DeprecationWarning,
|
|
43
|
+
)
|
|
36
44
|
super().__init__(
|
|
37
45
|
app,
|
|
38
|
-
allow_origins,
|
|
39
|
-
allow_methods,
|
|
40
|
-
allow_headers,
|
|
41
|
-
allow_credentials,
|
|
42
|
-
allow_origin_regex,
|
|
43
|
-
expose_headers,
|
|
44
|
-
max_age,
|
|
46
|
+
allow_origins=allow_origins,
|
|
47
|
+
allow_methods=allow_methods,
|
|
48
|
+
allow_headers=allow_headers,
|
|
49
|
+
allow_credentials=allow_credentials,
|
|
50
|
+
allow_origin_regex=allow_origin_regex,
|
|
51
|
+
expose_headers=expose_headers,
|
|
52
|
+
max_age=max_age,
|
|
53
|
+
**kwargs,
|
|
45
54
|
)
|
|
46
55
|
|
|
47
56
|
|
|
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
|