Using and Mastering Cookiecutter Transcripts
Chapter: Conclusion
Lecture: Finish line

Login or purchase this course to watch this video and the rest of the course contents.
0:01 Congratulations, you've made it to the end of this course, and not only did you make it through the course
0:09 you now have a new magic power- it's called cookiecutter. So the question is what are you going to build now?
0:16 I think you should take this moment, pause this video and write down three things you think could be made better with cookiecutter
0:23 and then make a plan to create at least one of those over the next month if we all did that, think how many cool things we could create
0:31 with cookiecutter in just a really short time. So congratulations, I hope you feel as you've gained a lot of knowledge about cookiecutter
0:39 that you can now use this new tool to do amazing things both with your own project, as well as other cookiecutter templates
0:45 that people have already created and published to the pantry full of cookies. Let's do a quick lightning review. So we started out in this course
0:53 by discussing what is cookiecutter and when to use it and you saw that cookiecutter is a project template creation framework
1:01 we can take these templates, we can run them we can create any sort of project it doesn't have to be Python even though the implementation is Python.
1:09 We saw that we can create Atari games C++ applications JavaScript apps all sorts of stuff;
1:15 we talked about some of the advanced features, running cookiecutter with no inputs, great for continuous integration and unit tests,
1:21 things like that; running it with the replay option so that it just reruns whatever we configure it to run, again this is good
1:30 for when you're building your own temple it's good when you're doing continuous integration and you don't want to take the default
1:36 we also saw that it can be annoying to type in answer questions like what's your name, what's your e mail
1:40 what's your gituhub account name and things like that continuously so we can create a global default file that solves that once and for all.
1:46 We talked about creating templates, we'd start with the cookiecutter.json file that has the prompts as well as things like extensions,
1:55 files that we should not transform, copy without render things like that we talked about the folder structure naming our folder things like
2:02 {{cookiecutter.project_name}} something like this we saw that we can create dependent properties that the cookiecutter.json is not just a static thing
2:11 but it kind of comes to life as it evaluates top to bottom so we can put Jinja expressions in here
2:16 and do a lot of cool things there for the most advanced features we would use hooks, we have a pre generation hook and a post generation hook
2:25 and we also have a choice variable if you've got a small restricted set of things like the template engine you want to use for a web framework
2:32 a choice variable would be great. We saw that we can take this concept of creating templates in a program
2:39 and make it even better, recall we made our game maker application and it can make hi-lo, it can make pong, and it can make hangman
2:47 and instead of just having the general prompts and inputs that cookiecutter gives we actually wrote a program that would take in that information
2:55 verify it if it was wrong it asked the question again and get everything ready to go and then it would create the game
3:02 using the underlying cookiecutter template programmatically so we would call cookiecutter.main.cookiecutter one as a package
3:11 one as a sub package, the final part is the method we would call that and of course we want to leverage the default values
3:16 so we could work with the config sub module and pull in the default values for whoever joining this minimize a number of questions
3:23 or at least make it nicer for them and we created our little app the game maker, and it presented itself
3:28 more nicely as sort of a project creation thing I didn't have to know anything about projection for the most part
3:34 because it just delegated all that information and that functionality to cookiecutter; we went through a few case studies
3:42 we talked about Beeware, OpenStack and Pyramid and how all three of these projects are making heavy use of cookiecutter
3:47 and how there's some really interesting stuff happening there; we shared our template, in fact,
3:52 I can tell you that the time of this recording now my template that I used as an example in this section
3:59 is now officially part of the pantry full of cookies on the cookiecutter site, so that process
4:04 I took you through that work for me at least, that was great. And finally we talked about modifying cookiecutter
4:10 there was a feature that I- or behavior let's say, not a feature, behavior I didn't like and I've talked about it throughout the course
4:16 that the yaml file, the parsing of is too strict and having a new line at the end
4:21 is really frustrating we went through and we saw how we could fix that in fact I did a little bit of back and forth with those guys
4:27 and now that is also accepted and should be officially part of cookiecutter so that shouldn't be a problem anymore, you can use that technique
4:34 to modify cookiecutter for whatever your needs are. Look at that, this is a ton of stuff that you've learned
4:40 and now you should be really empowered to do cool stuff with cookiecutter. But, before you go don't forget to take the code with you
4:46 visit github.com/mikeyckennedy-cookiecutter-course, and star this and fork this so that you have everything
4:54 that we've done, everything we've created throughout the course with you forever. I've done a small amount of reorganization
5:02 because I noticed as I was doing things live it got a little messy sometimes I had multiple projects generated next to the temple at itself
5:09 and so it might not look identical but it should be very very similar and self explanatory to what you saw us to together on the screen.
5:17 Thanks so much for taking this course I'll see you online! Bye.


Talk Python's Mastodon Michael Kennedy's Mastodon