(template_name: str, context: ContextType)
| 13 | |
| 14 | |
| 15 | def 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 | |
| 28 | def generate_app(context: AppContext): |
no outgoing calls
no test coverage detected