Questions tagged [cookiecutter]

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

Filter by
Sorted by
Tagged with
-1 votes
2 answers
25 views

Cookiecutter Django project postgres migrating to new host

I have a cookiecutter django template project working fine with a local postgres database. (https://cookiecutter-django.readthedocs.io/en/latest/) I've copied the git repository and recreated the ...
Jordan's user avatar
  • 9,024
0 votes
0 answers
22 views

Can a cookiecutter pre_prompt.py hook access the value of the template's `output_dir`?

I'm attempting to write a simple cookiecutter pre_prompt.py validation script that inspects the parent directory from which the template is being executed. Unfortunately, I cannot figure out how to ...
snapp's user avatar
  • 1
0 votes
0 answers
17 views

Waiting for postgres to become available

I used cookie-cutter to create a app with docker and drf integrated. I followed the steps told in documentation on trying command "docker-compose -f local.yml up" an error occurs which says:-...
Akash Verma's user avatar
0 votes
0 answers
109 views

Failed building wheel for pyzmq. could not build wheels for pyzmq, which is required to install pyproject.toml-based projects

could not build wheels for pyzmq, which is required to install pyproject.toml-based projects. Things I found on internet didn't help (such as pip install pyzmq==23.2.1) To reproduce: follow ...
Terlan's user avatar
  • 21
0 votes
0 answers
20 views

django cookiecutter project generating error

I am following the quickstart of django cookiecutter tutorial. I've installed cookiecutter's latest version and pulled the cookiecutter django repo and the promts were properly filled. But after the ...
he1dj's user avatar
  • 21
0 votes
0 answers
96 views

cookiecutter conditional prompt and capture output to variable

I am very much new in cookiecutter programming and trying to create an interactive program similar to below example to generate config! The requirement is to prompt for sub options conditionally if ...
Rio's user avatar
  • 637
0 votes
0 answers
23 views

Python Scaffolder Versioning

I've been working on core python app backend project, for which i've developed scaffolder project using cookiecutter library. This scaffolder project is version controlled through github, if suppose ...
Kannappan Chidambaram's user avatar
0 votes
1 answer
109 views

Cookiecutter Template Dependency Management

I'm developing a cookiecutter template. My template has some dependencies. For example, in hooks/post_gen_project.py I want to show a message using rich.print. How can I satisfy such a requirement? ...
Sadra's user avatar
  • 307
0 votes
0 answers
34 views

Django cookicecutter Docker not working [build errors]

I have been getting the below terminal errors when running: docker-compose -f local.yml build While following the docs here for running cookiecutter-django locally: cookiecutter django docs The output ...
PapaSmurf's user avatar
0 votes
1 answer
231 views

How do I create a nested cookiecutter?

I have a peculiar use case for a nested cookiecutter structure. My aim is to have: an "outer" template that can be cut straight from GitHub; an "inner" template that can be cut ...
gmason's user avatar
  • 95
0 votes
0 answers
53 views

Use of choice variables with cookiecutter version 2.1.1 failing with clueless error

I am using the cookiecutter python library with the following version : Cookiecutter 2.1.1. I'm working with this version to use some of the v2 features so I don't wish to downgrade the version. In ...
Alex's user avatar
  • 387
0 votes
1 answer
192 views

Cookiecutter : Stop the execution of the cookiecutter if user gives no as input to one parameter

Cookiecutter.json has a parameter which accepts "yes" or "no": { "test" : [ "yes", "no"] } If a user selects "yes" then it should continue ...
Pooja G's user avatar
  • 41
1 vote
0 answers
50 views

Cookie cutter for packaging Django app as a python package

There is a need of creating a Django project inside a python package and later package it as a python package. Current thought : Can I use poetry-cookie cutter to create python package and django-...
Pooja G's user avatar
  • 41
0 votes
1 answer
314 views

How do I implement a cookiecutter project with custom shortcuts for certain commands?

I am developing a cookiecutter template for LaTeX projects. However, I would like to implement a CLI that acts as a shortcut for certain commands. For example, the command cookiecutter --no-input --...
Mario Vago Marzal's user avatar
0 votes
0 answers
64 views

cookiecutter: none type for R scripts

I am trying to build an R project template with cookiecutter. However, I am facing a problem with the null type in my json configfile. Basically, I am building dataframes based on the columns that are ...
Revan's user avatar
  • 2,148
2 votes
1 answer
317 views

mypy {{cookiecutter.project_slug}} is not a valid Python package name

I am building a cookiecutter template for a python package, and I want to run a bunch of checks for the template repo itself with pre-commit. A skeleton of the repo looks like this: ...
Ben Jeffrey's user avatar
1 vote
1 answer
447 views

cookiecutter.exceptions.NonTemplatedInputDirException when trying to use cookiecutter from my repo

I have created a cookiecutter template. When I run it using the address from my directory in my computer, it works. However, I want to use cruft to be able to update my projects. It seems to require ...
Luisa's user avatar
  • 11
0 votes
1 answer
282 views

can I use cookie cutter on a template folder and have another cookiecutter in its sub directory

I have this file structure: /folder1 /{{cookiecutter.project_slug}} /src /{{cookiecutter.project_slug}}{{cookiecutter.package_type}} test.py main.py ...
tamarlev's user avatar
1 vote
0 answers
120 views

Call Github Actions in CookieCutter template

I am building a template repo that uses CookieCutter. The template itself will contain github action files that execute the tests in the template. When I make changes to the template itself, in the PR,...
josh's user avatar
  • 1,231
1 vote
1 answer
78 views

cookiecutter step when installing Pyramid application throws module not found error

I was trying to create Pyramid application using cookiecutter. After installing cookiecutter in my Debian GNU/linux 10 system and adding the path of ~/local to bash profile, the cookiecutter ...
tanzeem's user avatar
  • 161
1 vote
1 answer
2k views

How to use "make" with Windows and Anaconda?

I am attempting to follow this tutorial to learn how to use the Cookiecutter folder structure for data science projects. My machine is running Windows 10 and I am using Anaconda. It seems that the ...
Graham B's user avatar
0 votes
1 answer
84 views

How do I enforce a project to always wrap certain tags with {% raw %} and {% endraw %}?

I am creating template starters that will work with cookiecutter, a python library. So inside some of the subfolders of a project, for files of a particular type, usually .html, I need any tags that ...
Kim Stacks's user avatar
  • 10.4k
0 votes
0 answers
32 views

Is there a tool to lock cookiecutter template files

I've been using cruft and cookiecutter to allow users to get default configuration files. From time to time those files are changing and I want the users to run cruft upgrade. But in order to do so I ...
Orr Matityahu's user avatar
0 votes
1 answer
225 views

Don't ask for a derived variable in cookiecutter

This is my cookiecutter.json file: { "day": "1", "directory_name": "day-{{ cookiecutter.day }}" } Now I only want to be prompted for the day, but not ...
Alper's user avatar
  • 3,497
0 votes
1 answer
620 views

pre_gen_project hook script didn't exit successfully

Generating a dash component project using cookiecutter. Followed the installation guide of dash-component-boilerplate: https://github.com/plotly/dash-component-boilerplate Ubuntu 18.04.5 (WSL) Node - ...
user17715248's user avatar
0 votes
1 answer
123 views

django clone project migrate error occured

"django.db.utils.OperationalError" occurred while setting using django cookiecutter. config\settings\base.py DATABASES = { "default": env.db( "DATABASE_URL", ...
krsai's user avatar
  • 1
2 votes
1 answer
227 views

Python Cookie Cutter - Conditional Code Block?

Is it possible do some sort of conditional code block depending on the variable(s) set? I am trying to templatize a project which has some yaml configuration files. I would like a section of the yaml ...
Riley Hun's user avatar
  • 2,613
1 vote
1 answer
717 views

Cookiecutter: how do you override a dictionary variable using the command-line?

If I have variables in cookiecutter.json like so: { "app": { "name": "myapp", "description": "my app description", "...
Jun-Dai Bates-Kobashigawa's user avatar
0 votes
1 answer
337 views

ModuleNotFoundError: No module named 'cookiecutter'

Just upgraded my Mac to macOS Monterey 12.6, I am trying to use the python to create a project from a cookiecutter, throws this error: ModuleNotFoundError: No module named 'cookiecutter'
Gary's user avatar
  • 1
0 votes
1 answer
450 views

Cookiecutter: Add information to pyproject.toml according to template variable

In my cookiecutter template, I have the following question: "Do you want to use an internal repository? ["Yes", "No"]. If answered "Yes", I would like to add another ...
Andi's user avatar
  • 3,403
1 vote
1 answer
935 views

How to apply cruft/cookiecutter template to existing Git/GitHub project?

What's the best way to apply a cruft (or cookiecutter) template to an existing Git/GitHub project, which doesn't use any cookiecutter template so far?
Andi's user avatar
  • 3,403
0 votes
1 answer
789 views

ModuleNotFoundError: No module named 'kedro.versioning'

i have upgraded my kedro to latest version.But i have used kedro.versioning in my project.And latest kedro has no module of this name.Can anyone please suggest anything
pc01's user avatar
  • 11
1 vote
0 answers
227 views

how to use kedro.versioning in latest version of kedro?

I have previously used kedro version 0.17.6 in my project. Now i have upgraded my version to 0.18.2. But in latest version of kedro there is no module of kedro.versioning. So i am getting a error that ...
pc01's user avatar
  • 11
0 votes
1 answer
212 views

Cannot get cookiecutter to run properly on amazon linux

When running this command locally on mac, this works fine. However when running the same command on amazon linux, i get this issue: command: cookiecutter -f -v --no-input --config-file config.yaml ...
TheWalkingMalteser's user avatar
1 vote
2 answers
326 views

Cannot run cookiecutter after installing with pip in jenkins

Im trying to install the cookiecutter utility using a jenkins pipeline. I try run this stage: stage('Install CookieCutter') { steps{ script { ...
TheWalkingMalteser's user avatar
0 votes
1 answer
186 views

Django Cookiecutter Database restore

I'm trying to restore the database with the maintenance script provided. But there is a check in the script which doesn't allow me to restore if the user is postgres. Any reason for that ?
Not yet decided's user avatar
6 votes
1 answer
901 views

How to use dynamic variables in cookiecutter hooks?

I would like to use dynamic variables inside hooks/pre_gen_project.py. When I add a static text inside the hook file it works: {{ cookiecutter.update({"venv_path": "static/venvpath"...
emrec's user avatar
  • 65
1 vote
2 answers
2k views

Can you Integrate a Cookiecutter template with the Github Template repository feature?

At the moment I'm planning to write a python template for my company in order to have a consistent structure through all the different projects and channel some best practices. To do so it seems a ...
Someone2's user avatar
  • 461
-1 votes
1 answer
804 views

Cookiecutter Django fails Github Actions on Run pre-commit

***EDIT Issue resolved. Several things needed to be done to setup pre-commit in my environment prior to commit/push. 'git init' 'pre-commit install' open new terminal, activate venv 'pre-commit run —...
TElphee01's user avatar
0 votes
2 answers
371 views

dpkg-buildpackage with cookiecutter invalid or non-existing path to the source directory: debian/sampleproject

Hello I'm trying to create a deb package from a python project with virtualenv and to do it I'm using cookiecutter. I've never created a deb package in my life and so I'm following the guide listed ...
it 2000's user avatar
  • 11
1 vote
1 answer
656 views

Cookiecutter - choices with a custom entry

I am working with the cookicutter package and I would like to know if there is any way to have something like this: #cookiecutter.json { "name": "default name", "folder_name&...
user430953's user avatar
3 votes
2 answers
2k views

How to get cookiecutter to output to current working directory instead of nested directory?

We have a number of use cases where we'd like to be able to call cookiecutter and have the files and directories generated get put into the current working directory. Simple example What is ...
conner.xyz's user avatar
  • 6,503
0 votes
1 answer
765 views

How to set default in case of undefined variable in template for cookiecutter?

I am using cookiecutter 1.7.3 I want a way to have defaults in case an undefined variable in the template. What I tried using default filter in jinja "github_username": "{{ cookiecutter....
Kim Stacks's user avatar
  • 10.4k
0 votes
1 answer
912 views

Cookiecutter copy one folder to multiple folders with different names

My Cookiecutter project is structured like this ├── project │ ├── {{Cookiecutter.client_name}} │ │ ├── {{Cookiecutter.account_name}} │ │ │ │── some-folder │ │ │ ├── {{Cookiecutter....
Yaman Ahlawat's user avatar
0 votes
1 answer
194 views

AWS CloudFormation create parameterized CodeCommit repository

I have a CloudFormation template which creates a simple CodeCommit repository and places some code in it, based on a ZIP file in S3. However, the code inside this ZIP file has been parameterized using ...
vdvaxel's user avatar
  • 707
0 votes
1 answer
535 views

Cookiecutter - Django: Anymail[SES] boto3 region error

I am trying to deploy to AWS(EC2) a Cookiecutter Django project. The AWS user with this credentials has ful S3, SES and SNS policies. The EC2 server has also a role with full SES/S3 policies. In ...
Dorin.D's user avatar
  • 17
0 votes
1 answer
731 views

Cookiecutter : jinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got ':'

I am trying to learn how to use cookiecutter and have created my own django based project that contains some static jinja2 templates referencing .js, .map files. I have created and adapted this from a ...
dcs3spp's user avatar
  • 513
1 vote
1 answer
3k views

Cant use the coockiecutter command after pip install windows

I went on the cmdl and pip install cookiecutter This worked fine because when i do pip show -f cookiecutter I have the information of where it was saved(i.e: c:\users\name\appdata\roaming\python\...
Roger Steinberg's user avatar
3 votes
2 answers
980 views

Is it possible to run a Cookiecutter template file without creating the local folder?

When I use cookiecutter, especially in the first phases of the project, I find myself debugging the instantiated copy of the template, finding the problem, and then having to go back to the template ...
Mike's user avatar
  • 573
7 votes
0 answers
491 views

python cookiecutter : Is there a way to make an input variable mandatory in cookiecutter?

I have a cookiecuttern json like below { "variable1": "Test variable 1 - mandatory", "variable2": "Test variable 2" } Is there any way to specify to ...
rohit2219's user avatar
  • 228