File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
ogc_api_processes_fastapi Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 11"""API routes registration and initialization."""
22
33import typing
4- from typing import Callable
4+ from typing import Any , Callable
55
66import fastapi
77import pydantic
@@ -60,8 +60,26 @@ def instantiate_app(
6060 exception_handler : Callable [
6161 [fastapi .Request , exceptions .OGCAPIException ], fastapi .responses .JSONResponse
6262 ] = exceptions .ogc_api_exception_handler ,
63+ ** kwargs : Any ,
6364) -> fastapi .FastAPI :
64- app = fastapi .FastAPI ()
65+ """Instantiate FastAPI application.
66+
67+ Parameters
68+ ----------
69+ client : clients.BaseClient
70+ Client to be used for API requests.
71+ exception_handler : Callable[[fastapi.Request, exceptions.OGCAPIException],
72+ fastapi.responses.JSONResponse], optional
73+ Exception handler, by default exceptions.ogc_api_exception_handler
74+ **kwargs : Any
75+ Additional parameters passed to `fastapi.Fastapi()`.
76+
77+ Returns
78+ -------
79+ fastapi.FastAPI
80+ FastAPI application.
81+ """
82+ app = fastapi .FastAPI (** kwargs )
6583 router = instantiate_router (client )
6684 app .include_router (router )
6785 app = exceptions .include_exception_handlers (app , exception_handler )
You can’t perform that action at this time.
0 commit comments