Skip to content

Commit 7be77fe

Browse files
committed
fix fastapi alias
1 parent 61cc0a7 commit 7be77fe

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

src/idom/server/fastapi.py

+3-16
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,10 @@
2222
Options = starlette.Options
2323
"""Alias for :class:`idom.server.starlette.Options`"""
2424

25-
26-
def configure(
27-
app: FastAPI,
28-
constructor: RootComponentConstructor,
29-
options: starlette.Options | None = None,
30-
) -> None:
31-
"""Prepare a :class:`FastAPI` server to serve the given component
32-
33-
Parameters:
34-
app: An application instance
35-
constructor: A component constructor
36-
config: Options for configuring server behavior
37-
"""
38-
options = starlette._setup_options(options)
39-
starlette._setup_common_routes(options, app)
40-
starlette._setup_single_view_dispatcher_route(options.url_prefix, app, constructor)
25+
configure = starlette.configure
26+
"""Alias for :class:`idom.server.starlette.configure`"""
4127

4228

4329
def create_development_app() -> FastAPI:
30+
"""Create a development ``FastAPI`` application instance."""
4431
return FastAPI(debug=IDOM_DEBUG_MODE.current)

0 commit comments

Comments
 (0)