Skip to main content

A command-line utility that creates projects from project templates, e.g. creating a Python package project from a Python package project template.

Project description

cookiecutter Logo

pypi python Build Status codecov discord docs Code Quality

Cookiecutter

Create projects swiftly from cookiecutters (project templates) with this command-line utility. Ideal for generating Python package projects and more.

Installation

Install cookiecutter using pip package manager:

# pipx is strongly recommended.
pipx install cookiecutter

# If pipx is not an option,
# you can install cookiecutter in your Python user directory.
python -m pip install --user cookiecutter

Features

  • Cross-Platform: Supports Windows, Mac, and Linux.
  • User-Friendly: No Python knowledge required.
  • Versatile: Compatible with Python 3.7 to 3.11.
  • Multi-Language Support: Use templates in any language or markup format.

For Users

Quick Start

The recommended way to use Cookiecutter as a command line utility is to run it with pipx, which can be installed with pip install pipx, but if you plan to use Cookiecutter programmatically, please run pip install cookiecutter.

Use a GitHub template

# You'll be prompted to enter values.
# Then it'll create your Python package in the current working directory,
# based on those values.
# For the sake of brevity, repos on GitHub can just use the 'gh' prefix
$ pipx run cookiecutter gh:audreyfeldroy/cookiecutter-pypackage

Use a local template

$ pipx run cookiecutter cookiecutter-pypackage/

Use it 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('gh:audreyfeldroy//cookiecutter-pypackage.git')

Detailed Usage

  • Generate projects from local or remote templates.
  • Customize projects with cookiecutter.json prompts.
  • Utilize pre-prompt, pre- and post-generate hooks.

Learn More

For Template Creators

  • Utilize unlimited directory nesting.
  • Employ Jinja2 for all templating needs.
  • Define template variables easily with cookiecutter.json.

Learn More

Available Templates

Discover a variety of ready-to-use templates on GitHub.

Special Templates

Community

Join the community, contribute, or seek assistance.

Support

  • Star us on GitHub.
  • Stay tuned for upcoming support options.

Feedback

We value your feedback. Share your criticisms or complaints constructively to help us improve.

Waiting for a Response?

  • Be patient and consider reaching out to the community for assistance.
  • For urgent matters, contact @audreyfeldroy for consultation or custom development.

Code of Conduct

Adhere to the PyPA Code of Conduct during all interactions in the project's ecosystem.

Acknowledgements

Created and led by Audrey Roy Greenfeld, supported by a dedicated team of maintainers and contributors.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cookiecutter-2.5.0.tar.gz (157.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cookiecutter-2.5.0-py3-none-any.whl (39.1 kB view details)

Uploaded Python 3

File details

Details for the file cookiecutter-2.5.0.tar.gz.

File metadata

  • Download URL: cookiecutter-2.5.0.tar.gz
  • Upload date:
  • Size: 157.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for cookiecutter-2.5.0.tar.gz
Algorithm Hash digest
SHA256 e61e9034748e3f41b8bd2c11f00d030784b48711c4d5c42363c50989a65331ec
MD5 8d64c91c89d9c5a2a279dbfe7db96518
BLAKE2b-256 1a5d9f6a7b748436597060654c8b5815dabedd78893e566bc9838c6dcbf05e04

See more details on using hashes here.

File details

Details for the file cookiecutter-2.5.0-py3-none-any.whl.

File metadata

  • Download URL: cookiecutter-2.5.0-py3-none-any.whl
  • Upload date:
  • Size: 39.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for cookiecutter-2.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8aa2f12ed11bc05628651e9dc4353a10571dd9908aaaaeec959a2b9ea465a5d2
MD5 4e43ed0cbce0e8bc6177f2f4099c2590
BLAKE2b-256 d13291af80d3ecbe0113ae26cdaa623a3def2319a02c1eafe91733ac45133afd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page