Cookiecutter
Cookiecutter is a command line utility that creates projects from project templates, known as "cookiecutters". When creating a new project from a template, Cookiecutter prompts the engineer to interactively make choices that are specific to the template they are setting up. This allows for pre-configuration of generic decisions like project source code structure, as well as project specific decisions such as integration with a cloud provider for deployment and a build system for CI/CD. Cookiecutter then uses a templating system — Jinja2 — to replace or customize folder and file names, as well as specific file content.
Cookiecutter takes a template provided as a directory structure with template-files. Cookiecutter supports using templates located in the filesystem, as a ZIP-file or on a VCS-Server (Git/Hg) like GitHub. Almost all of Jax's customized templates are co-located in the Software Templates Bitbucket repository.
Why Cookiecutter?
Starting a new repository in a project can be cumbersome, specially if you collaborate with others: you have to follow standards and agreements, there are some mandatory files, you have to place, deploy artifacts somewhere, the requirements should be in a certain place etcetera. Also, with every new project we may reuse or modify existing connectors/modules/libraries, or create new ones inspired in the old ones. And so, we would like to make a template that can be reused. An excellent package to achieve this is called cookiecutter.
Cookiecutter Features
-
Project templates can be in any programming language or markup format: Python, JavaScript, Ruby, CoffeeScript, RST, Markdown, CSS, HTML, you name it. You can use multiple languages in the same project template.
-
Powered by
Jinja2, and able to leverage most functionality of that templating engine. -
Cross-platform: Windows, Mac, and Linux are officially supported.
-
You don’t have to know/write Python code to use Cookiecutter.
Installation
Quick Start
- Install - Docs
- Browse - Jax Software Tempaltes
- Cut Cookies!
- Tell cookiecutter which tempalte you want to use
- Answer the prompts!
Where To Find Cookiecutter Templates
Jax maintains templates that are specifically tailored to use in Jax's development and deployment environments. These templates are available in a singular combined git repository in Bitbucket: software-tempaltes.
If you don't find what you need there, the next best place to start searching for specific and ready to use cookiecutter template is Github search.
You can also find the templates maintained by the cookiecutter team here.
Cookiecutter templates @ JAX devops
Cookiecutter Templates Maintained by the Cookiecutter Team:
cookiecutter-pypackage: ultimate Python package project template.
cookiecutter-django: a framework for jumpstarting production-ready Django projects quickly. It is bleeding edge with Bootstrap 5, customizable user's app, starter templates, working user registration, celery setup, and much more.
cookiecutter-pytest-plugin: Minimal Cookiecutter template for authoring pytest plugins that help you to write better programs.