stac-fastapi.api 6.1.0__tar.gz → 6.1.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.0 → stac_fastapi_api-6.1.1}/PKG-INFO +1 -1
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/app.py +7 -4
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/version.py +1 -1
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/.gitignore +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/README.md +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/pyproject.toml +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/__init__.py +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/config.py +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/errors.py +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/middleware.py +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/models.py +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/openapi.py +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.1}/stac_fastapi/api/py.typed +0 -0
- {stac_fastapi_api-6.1.0 → stac_fastapi_api-6.1.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.1.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>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"""Fastapi app creation."""
|
|
2
2
|
|
|
3
3
|
|
|
4
|
+
import inspect
|
|
4
5
|
from typing import Awaitable, Callable, Dict, List, Optional, Tuple, Type, Union
|
|
5
6
|
|
|
6
7
|
import attr
|
|
@@ -8,7 +9,6 @@ from brotli_asgi import BrotliMiddleware
|
|
|
8
9
|
from fastapi import APIRouter, FastAPI
|
|
9
10
|
from fastapi.params import Depends
|
|
10
11
|
from stac_pydantic import api
|
|
11
|
-
from stac_pydantic.api.collections import Collections
|
|
12
12
|
from stac_pydantic.shared import MimeTypes
|
|
13
13
|
from stac_pydantic.version import STAC_VERSION
|
|
14
14
|
from starlette.middleware import Middleware
|
|
@@ -32,6 +32,7 @@ from stac_fastapi.api.routes import (
|
|
|
32
32
|
add_direct_response,
|
|
33
33
|
add_route_dependencies,
|
|
34
34
|
create_async_endpoint,
|
|
35
|
+
sync_to_async,
|
|
35
36
|
)
|
|
36
37
|
from stac_fastapi.types.config import ApiSettings, Settings
|
|
37
38
|
from stac_fastapi.types.core import AsyncBaseCoreClient, BaseCoreClient
|
|
@@ -277,14 +278,14 @@ class StacApi:
|
|
|
277
278
|
name="Get Collections",
|
|
278
279
|
path="/collections",
|
|
279
280
|
response_model=(
|
|
280
|
-
Collections if self.settings.enable_response_models else None
|
|
281
|
+
api.Collections if self.settings.enable_response_models else None
|
|
281
282
|
),
|
|
282
283
|
responses={
|
|
283
284
|
200: {
|
|
284
285
|
"content": {
|
|
285
286
|
MimeTypes.json.value: {},
|
|
286
287
|
},
|
|
287
|
-
"model": Collections,
|
|
288
|
+
"model": api.Collections,
|
|
288
289
|
},
|
|
289
290
|
},
|
|
290
291
|
response_class=self.response_class,
|
|
@@ -411,7 +412,9 @@ class StacApi:
|
|
|
411
412
|
},
|
|
412
413
|
response_class=self.response_class,
|
|
413
414
|
methods=["GET"],
|
|
414
|
-
endpoint=self.health_check
|
|
415
|
+
endpoint=self.health_check
|
|
416
|
+
if inspect.iscoroutinefunction(self.health_check)
|
|
417
|
+
else sync_to_async(self.health_check),
|
|
415
418
|
)
|
|
416
419
|
self.app.include_router(mgmt_router, tags=["Liveliness/Readiness"])
|
|
417
420
|
|
|
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
|