Skip to content

Latest commit

 

History

History
20 lines (12 loc) · 698 Bytes

calling_from_python.rst

File metadata and controls

20 lines (12 loc) · 698 Bytes

Calling Cookiecutter Functions From Python

You can use Cookiecutter from Python:

from cookiecutter.main import cookiecutter

# Create project from the cookiecutter-pypackage/ template
cookiecutter('cookiecutter-pypackage/')

# Create project from the cookiecutter-pypackage.git repo template
cookiecutter('https://github.com/audreyr/cookiecutter-pypackage.git')

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

See the API Reference <apiref> for more details.