MCPcopy
hub / github.com/ycd/manage-fastapi / fill_template

Function fill_template

manage_fastapi/generator.py:15โ€“25  ยท  view source on GitHub โ†—
(template_name: str, context: ContextType)

Source from the content-addressed store, hash-verified

13
14
15def fill_template(template_name: str, context: ContextType):
16 try:
17 cookiecutter(
18 os.path.join(TEMPLATES_DIR, template_name),
19 extra_context=context.dict(),
20 no_input=True,
21 )
22 except OutputDirExistsException:
23 typer.echo(f"Folder '{context.folder_name}' already exists. ๐Ÿ˜ž")
24 else:
25 typer.echo(f"FastAPI {template_name} created successfully! ๐ŸŽ‰")
26
27
28def generate_app(context: AppContext):

Callers 2

generate_appFunction ยท 0.85
generate_projectFunction ยท 0.85

Calls

no outgoing calls

Tested by

no test coverage detected