stac-fastapi.api 7.0.0__tar.gz → 7.1.0__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-7.0.0 → stac_fastapi_api-7.1.0}/PKG-INFO +1 -1
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/routes.py +30 -12
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/version.py +1 -1
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/.gitignore +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/README.md +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/pyproject.toml +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/__init__.py +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/app.py +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/config.py +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/errors.py +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/metrics.py +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/middleware.py +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/models.py +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/openapi.py +0 -0
- {stac_fastapi_api-7.0.0 → stac_fastapi_api-7.1.0}/stac_fastapi/api/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: stac-fastapi-api
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.1.0
|
|
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>
|
|
@@ -167,15 +167,33 @@ def add_direct_response(app: FastAPI) -> None:
|
|
|
167
167
|
|
|
168
168
|
return wrapper
|
|
169
169
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
170
|
+
def wrap_routes(routes: list[BaseRoute]) -> None:
|
|
171
|
+
for route in routes:
|
|
172
|
+
# Since FastAPI 0.137, `include_router` keeps the included router
|
|
173
|
+
# instead of copying its routes into `app.routes`.
|
|
174
|
+
if hasattr(route, "original_router"):
|
|
175
|
+
wrap_routes(route.original_router.routes)
|
|
176
|
+
continue
|
|
177
|
+
|
|
178
|
+
if not isinstance(route, APIRoute):
|
|
179
|
+
continue
|
|
180
|
+
|
|
181
|
+
response_class = route.response_class
|
|
182
|
+
if isinstance(response_class, DefaultPlaceholder):
|
|
183
|
+
response_class = response_class.value
|
|
184
|
+
|
|
185
|
+
if issubclass(response_class, Response):
|
|
186
|
+
route.endpoint = wrap_endpoint(route.endpoint, response_class)
|
|
187
|
+
route.dependant = get_dependant(
|
|
188
|
+
path=route.path_format, call=route.endpoint
|
|
189
|
+
)
|
|
190
|
+
for depends in route.dependencies[::-1]:
|
|
191
|
+
route.dependant.dependencies.insert(
|
|
192
|
+
0,
|
|
193
|
+
get_parameterless_sub_dependant(
|
|
194
|
+
depends=depends, path=route.path_format
|
|
195
|
+
),
|
|
196
|
+
)
|
|
197
|
+
route.app = request_response(route.get_route_handler())
|
|
198
|
+
|
|
199
|
+
wrap_routes(app.routes)
|
|
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
|