Modern Python Projects Transcripts
Chapter: Cookiecutter templates
Lecture: Summary

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Cookie cutter is one of the best answers to one of those How to build X in Python questions. You want to build a Django website.
0:09 Great use Cookie cutter Django, Flask or fast API. Their templates for those frameworks to, want to publish a package on PyPI.
0:17 But you have never done this, so you are not sure how to start. Well, there is a cookie cutter -py package that you can use, using Cookie
0:24 cutter can give you a head start when building a new Python project. Instead of setting up everything by hand,
0:30 you can use one of the existing templates. Some of the main benefits of using a cookie cutter are that, it removes a lot
0:37 of boring work that you need to do when you set up the project. When you start building a Django website,
0:42 you probably need to add some plugins for authentication, maybe install pytest with some plugins.
0:48 Set up continuous integration to make sure that your tests are running automatically on GitHub
0:52 That's all boring work that you have to do for every project, and I'm pretty sure just like me,
0:58 you would prefer to actually build that website, instead of dealing with all this stuff,
1:03 especially since it's easy to meet something and then you waste even more time debugging some
1:08 miss configured settings. Cookie cutter deals with this problem for us.
1:13 You answer some questions, and it immediately generates a project with all those things already
1:18 set up for you. And it's not only useful at the beginning of the project
1:22 but also at the end when it's time to deploy your application or publisher package to PyPI, with cookie cutter. We usually have everything already set
1:32 for that, it's very easy to create or modify and new cookie cutter template. The simplest template is just a folder with some files.
1:41 But if you need something more advanced, cookie cutter got you covered with its simple templating
1:45 language. Cookie cutter helps you set some good and safe default settings for your
1:52 project. The most popular templates have been used and reviewed by thousands of developers.
1:57 If there was something wrong, or if someone noticed a security vulnerability, they probably already reported and fix that,
2:04 so you can be sure that you are starting your project following the best practices and
2:09 I like to think about cookie cutter templates as getting a feedback from hundreds of developers who contributed to that template.
2:16 A free feedback from people who have been writing Python packages or Django applications for years.
2:22 And the best part is that you don't have to argue with them on what's the best way of doing something. It has already been established,
2:29 and by using a specific template, you just follow those recommendations.


Talk Python's Mastodon Michael Kennedy's Mastodon