Using and Mastering Cookiecutter Transcripts
Chapter: Advanced Cookiecutter usage
Lecture: No inputs

Login or purchase this course to watch this video and the rest of the course contents.
0:02 I told you that the no inputs feature might be really nice for continuous integration and this is not a CI build machine or anything,
0:11 but let's go and have a look anyway. So we can run cookiecutter cookiecutter-bottle and it was going to ask us some questions,
0:19 now let's just take the all of the defaults for now, so if I say yes this is my name, this is my email address, this is my GitHub user, whatever,
0:28 boom, and then it's going to generate this mybottlea. Alright, so if we go and look in here, we'll see that things like,
0:35 we'll see it named it mybottle like we had said, if we look at the read me you can see it's just taken the defaults everywhere,
0:42 okay, so that's all going good, let's go back out for a second here, and erase this so we have nothing in this folder anymore.
0:49 So now we can run this again, but this time, without it asking any questions, just say take all the defaults which is what we did anyway
0:55 but I had to hit enter a bunch of times. So say --no-input and we hit enter, and bam, what happens, well it generates exactly the same thing,
1:10 so if you're going to make executing a Cookiecutter template as part of something like continuous integration build
1:16 or if for whatever reason you want to run it without it asking the user questions then you got this.
1:21 You'll see that we can actually pass additional information to overwrite some of those values, when we run this
1:26 when we get to consuming the Cookiecutter API you will see that you can pass no input
1:30 but then overwrite it with stuff that maybe your program asks for, things like that, so it's pretty cool, but this is a good start,
1:36 I guess the most common use case I see here really is for continuous integration or some form of testing.

Talk Python's Mastodon Michael Kennedy's Mastodon