Skip to main content
Documentation Status https://github.com/MacHu-GWU/cookiecutter_maker-project/workflows/CI/badge.svg https://codecov.io/gh/MacHu-GWU/cookiecutter_maker-project/branch/main/graph/badge.svg https://img.shields.io/pypi/v/cookiecutter_maker.svg https://img.shields.io/pypi/l/cookiecutter_maker.svg https://img.shields.io/pypi/pyversions/cookiecutter_maker.svg https://img.shields.io/badge/STAR_Me_on_GitHub!--None.svg?style=social
https://img.shields.io/badge/Link-Document-blue.svg https://img.shields.io/badge/Link-API-blue.svg https://img.shields.io/badge/Link-Source_Code-blue.svg https://img.shields.io/badge/Link-Install-blue.svg https://img.shields.io/badge/Link-GitHub-blue.svg https://img.shields.io/badge/Link-Submit_Issue-blue.svg https://img.shields.io/badge/Link-Request_Feature-blue.svg https://img.shields.io/badge/Link-Download-blue.svg

Welcome to cookiecutter_maker Documentation

Summary

Python Cookiecutter is an awesome library that can create projects from templates. In an enterprise setting, people typically start with a concrete, working project and then convert it into a template that serves as the internal standard for future use (Template -> Project).

📋 Cookiecutter Maker is the inverse of cookiecutter (Project -> Template). It is a Python open source tool that can convert any given folder structure into a cookiecutter project.

Usage Example

Run the following python script to convert your concrete project into a template project:

from cookiecutter_maker.maker import Maker

maker = Maker.new(
    # the input concrete project directory
    input_dir="/path-to-input-dir/my_awesome_project",
    # the output template project directory
    output_dir="/path-to-output-dir",
    # define the pair of ``concrete string`` and ``parameter name``
    mapper=[
        ("my_awesome_project", "package_name"),
    ],
    # define what to include in the input directory
    # it is the relative path from the input directory
    # the rule is 'explicit exclude' > 'explicit include' > 'default include'
    include=[],
    # define what to exclude in the input directory
    # it is the relative path from the input directory
    exclude=[
        # dir
        ".venv",
        ".pytest_cache",
        ".git",
        ".idea",
        "build",
        "dist",
        "htmlcov",
        # file
        ".coverage",
    ],
    # over write the output location if already exists
    overwrite=True,
    # do you want to print debug information?
    debug=True,
)
maker.templaterize()

In this example, it will create a directory {{ cookiecutter.package_name }} and a json file cookiecutter.json. Now you can follow the cookiecutter instruction to generate more concrete projects.

Install

cookiecutter_maker is released on PyPI, so all you need is:

$ pip install cookiecutter_maker

To upgrade to latest version:

$ pip install --upgrade cookiecutter_maker

Metadata

Release files for cookiecutter_maker 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cookiecutter_maker 0.2.1
File Size Uploaded Provenance Actions
cookiecutter_maker-0.2.1.tar.gz 9.1 kB Without provenance Details for cookiecutter_maker-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cookiecutter_maker 0.2.1
File Interpreter ABI Platform Actions
cookiecutter_maker-0.2.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for cookiecutter_maker-0.2.1-py2.py3-none-any.whl

Total release size: 16.6 kB

Release files / cookiecutter_maker-0.2.1.tar.gz

Download URL cookiecutter_maker-0.2.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1d98eb6b8d6b0efb952f17b7e48b332bf03c2851a121908839827f74904ae274
BLAKE2b-256 checksum
How to use checksums
80c492f7d203c27fc9f505acf75851c82c21ad92f656e41460f5c4f329c1c4a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.11

Release files / cookiecutter_maker-0.2.1-py2.py3-none-any.whl

Download URL cookiecutter_maker-0.2.1-py2.py3-none-any.whl
Size 7.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
09bb42b28d4c6a70fda14aa365dd99eed9bb159084bb336f32fd1259c3bcdf22
BLAKE2b-256 checksum
How to use checksums
c7d139f66263808c3250624fafe6303f92da25fd1705c11be33a3e3e928f285f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.8.11

Security for cookiecutter_maker 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page