File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import typer
66from pydantic import ValidationError
77from rich import print
8+ from rich .syntax import Syntax
89from rich .tree import Tree
910
1011from fastapi_cli .config import FastAPIConfig
@@ -215,6 +216,24 @@ def _run(
215216 toolkit .print (f" • Module: { mod_source_desc } " )
216217 toolkit .print (f" • App name: { app_source_desc } " )
217218
219+ if import_data .module_config_source == "auto-discovery" :
220+ toolkit .print_line ()
221+ toolkit .print (
222+ "You can configure an entrypoint in pyproject.toml for this app with:" ,
223+ tag = "tip" ,
224+ )
225+ toolkit .print_line ()
226+ toolkit .print (
227+ Syntax (
228+ (
229+ "[tool.fastapi]\n "
230+ f'entrypoint = "{ import_data .module_data .module_import_str } :{ import_data .app_name } "'
231+ ),
232+ "toml" ,
233+ theme = "ansi_light" ,
234+ )
235+ )
236+
218237 url = f"http://{ host } :{ port } "
219238 url_docs = f"{ url } /docs"
220239
You can’t perform that action at this time.
0 commit comments