Calling Cookiecutter Functions From Python

You can use Cookiecutter from Python:

from cookiecutter.main import cookiecutter

# Create project from the cookiecutter-pypackage/ template

# Create project from the cookiecutter-pypackage.git repo template

This is useful if, for example, you’re writing a web framework and need to provide developers with a tool similar to startproject or npm init.