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.12.
  • 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.6.0.tar.gz (158.8 kB view details)

Uploaded Source

Built Distribution

cookiecutter-2.6.0-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cookiecutter-2.6.0.tar.gz
Algorithm Hash digest
SHA256 db21f8169ea4f4fdc2408d48ca44859349de2647fbe494a9d6c3edfc0542c21c
MD5 bb7cf1dc80c9e42d18c3fc7ce459f07e
BLAKE2b-256 52179f2cd228eb949a91915acd38d3eecdc9d8893dde353b603f0db7e9f6be55

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cookiecutter-2.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a54a8e37995e4ed963b3e82831072d1ad4b005af736bb17b99c2cbd9d41b6e2d
MD5 f444f8695cf15c65c99ec5a18497ecde
BLAKE2b-256 b6d90137658a353168ffa9d0fc14b812d3834772040858ddd1cb6eeaf09f7a44

See more details on using hashes here.

Supported by

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