Using and Mastering Cookiecutter Transcripts
Chapter: Welcome to the course
Lecture: Welcome and what is Cookiecutter
Login or purchase this course to watch this video and the rest of the course contents.
0:01 Hello and welcome to "Using and Mastering Cookiecutter". I'm really excited that you are taking this course
0:10 and that you are interested into looking into Cookiecutter. It's a fantastic tool and it's really powerful,
0:16 I think you are going to learn and appreciate a lot of that power, in this course. Let's begin by answering the question what is Cookiecutter?
0:24 Well, we can create a template, a set of files for any given project, this could be a Python application, this could be an Apple application,
0:32 this could even just be some scientific research project template that doesn't have any code at all, we're going to create this template
0:40 and we're going to feed it to the Cookiecutter engine. Now, this could be Python, it could be C++, it could be C#,
0:49 the language of the template is irrelevant, it's about managing files and resources and creating project structure from some source template
0:57 and asking the user a certain number of questions, so things like what is your project called, are you going to deploy this to the cloud,
1:06 what ORM are you going to use and so on. So we are going to take the template and feed this information into Cookiecutter
1:11 and out pops a brand new shiny, ready to start project. So that is what Cookiecutter is. It takes templates called Cookiecutters,
1:20 and it generates via asking the users a couple of questions, project templates for any type of app that you want to get started with.
1:27 Cookiecutter was created by Audrey Roy Greenfeld, back in 2013, you may know Audrey from the Two Scoops of Django,
1:36 she and her husband Danny wrote this book and it's very well known Django book,
1:40 you can read Danny's announcement of the Cookiecutter project here at this url,
1:45 when they first launched it, it will give you a little background information on what Cookiecutter is and why they created it.
1:52 So, when and how do you use Cookiecutter? I think there is two cases, on one hand you might just be
1:57 a user who wants to just consume Cookiecutter templates, I want to create a new Django project that is set up just so based on a Cookiecutter template,
2:06 I want to create a new Pyramid web app based on a Cookiecutter template. So, for these types of users, there is certain benefits,
2:14 first of all, you can easily create very complex and intricate projects,
2:18 the Cookiecutter can be set up to create the project however it needs to be done, and all you have to do is answer a few basic questions,
2:25 and instead of worrying about what files you have to create, how they are relatively located to each other, things like that, the formats,
2:31 you just answer a few questions and boom, you have some new app ready to roll.
2:35 It makes the process of creating projects very repeatable, and that is nice. It also is faster onboarding for new developers,
2:43 so instead of teaching developers all the things you need to know about the layout and structure of a project, you can just say run this command,
2:50 Cookiecutter (space) my template name, and boom, they are ready to go. On the other hand, you might want to create Cookiecutter template,
2:58 maybe you work at a company and you want to create a Cookiecutter template for your team or your organization,
3:03 or you might run an open source project where you want to create a template for users of that open source project.
3:09 So here you can possibly increase adoption of your project, maybe it was something that was kind of hard to get started with,
3:15 and now because you have a simple template to do so, it's easy, you can reduce support costs or support effort right,
3:23 you won't have to answer those, well, how do I get started, how do I do this thing, or how do I set up that to get this thing to run,
3:29 your Cookiecutter template will get them beyond the initial setup steps so you basically can skip a bunch of those questions and challenges.
3:36 You can help users fall into the pit of success, by that I mean you can setup your project, so that everything is set up
3:44 in the best possible way before they even start to touch it, and give them the guidance to get going, not just creating the file structure and so on,
3:51 but actually asking them the right questions. And as you will see in the programmatic part, you can even wrap this up in a little application,
3:59 that makes this process of creation even nicer. And, you could gain more exposure for your project,
4:04 if it's an open source project, you could get that project listed in the Cookiecutter documentation saying here is a way to create this cool project,
4:11 people might look at that and go oh, I didn't know that existed, let me check that out, and of course, it will be easy for them to do so,
4:17 because they just have to run your template. Finally, if you work inside a company, this can provide a lot of consistency across your organization.
4:25 If the way all new projects that your company created is by running a certain Cookiecutter template for your technology,
4:31 then you can be sure that there is a minimum level of consistency across all those projects and if you have a lot of projects,
4:38 a lot of developers all working in parallel, this can be super valuable if you invest into these templates. So, this is just some of the use cases
4:47 and some of the reasons that you might use Cookiecutter. We'll talk about a whole bunch more as you go through this course.