Files
TestCookieCutter/main.py
2024-01-10 15:32:18 +05:00

26 lines
682 B
Python

import typer
from cookiecutter.main import cookiecutter
app = typer.Typer()
@app.command()
def create_project(project_name: str,
template: str = "cookiecutter-test",
output_dir: str = ".",
use_database: bool = True,
use_cache: bool = True,
):
typer.echo(f"Creating project {project_name}")
cookiecutter(template,
no_input=True,
extra_context={
"use_database": use_database,
"use_cache": use_cache,
},
output_dir=output_dir)
if __name__ == "__main__":
app()