Cookiecutter: Creating Projects and Templates Course

Course Summary

Getting started with new projects in a reliable, easy, and reproducible way is very important. Cookiecutter has become one of the most popular tools in this area. Throughout this course, you will learn to consume the over 1,000 existing project templates for a wide variety of languages as well as create templates for your public or internal projects.

What students are saying

Watching Effective PyCharm from Talk Python. I’ve been using PyCharm for a long time and it’s really powerful, but wow I was barely scratching the surface with all the shortcuts and optimizations. I highly recommend this course if you are using PyCharm, it’s fantastic.
-- Sean

Source code and course GitHub repository

github.com/mikeckennedy/cookiecutter-course

What's this course about and how is it different?

The goal of this online video course goes beyond simply using Cookiecutter. While we do cover that in-depth, the focus is on creating powerful and professional Cookiecutter templates, integrating Cookiecutter into your Python applications via its API, and even developing and extending Cookiecutter itself.

This course is a careful balance of live demos, interactive coding, and core concept review. After this course, you'll understand and be capable of wielding the full power of Cookiecutter.

Who is this course for?

This course is targeted at three use-cases of Cookiecutter. It's for those who:

  1. Use Cookiecutter templates to create their own projects
  2. Author templates for their own projects or teams within larger companies
  3. Developers wishing to extend and integrate Cookiecutter functionality into their own Python applications

Note that Python experience is mostly optional.

For most chapters of this course, you will not need to know Python, although the more you know the better. Even creating templates can be done with essentially no Python experience.

However, if you want to extend Cookiecutter or use the Cookiecutter API, then you'll need to be familiar with Python.

What will you learn in this course?

The course is built from three major sections.

  1. Cookiecutter users
  2. Cookiecutter for project leads
  3. Cookiecutter for contributors

Here are some of the detailed topics addressed in each section.

Cookiecutter users section

  • Prerequisites and setup
  • Installing Cookiecutter
  • Learning the CLI
  • Surveying the pantry
  • Local vs remote templates
  • Profile defaults
  • Virtual environments
  • Replaying creation

Cookiecutter for project leads section

  • Creating templates for your project & for your company
  • Creation basics
  • Project structure and naming
  • Prompting the user
  • Complex default values
  • Choice prompts
  • pre- post-generation hooks
  • Excluding files from transforms
  • Conditional files and directories
  • Case study (project templates)
  • Adding your template to the cookie pantry
  • Programmatic Cookiecutter

Cookiecutter for contributors

  • Building Cookiecutter locally
  • Contributor guidelines
  • Adding a feature to Cookiecutter

View the full course outline.

Concepts backed by concise visuals

While exploring a topic interactively with demos and live code is very engaging, it can lose the forest for the trees. That's why when we hit a new topic, we stop and discuss it with concise and clear visuals.

Here's an example for when we first introduce the benefits of Cookiecutter.

Example: Concepts backed by concise visuals

Follow along with subtitles and transcripts

Each course comes with subtitles and full transcripts. The transcripts are available as a separate searchable page for each lecture. They also are available in course-wide search results to help you find just the right lecture.

Each course has subtitles available in the video player.

Who am I? Why should you take my course?

Who is Michael Kennedy?

My name is Michael, nice to meet you. ;) There are a couple of reasons I'm especially qualified to teach you Python.

 1. I'm the host of the #1 podcast on Python called Talk Python To Me. Over there, I've interviewed many of the leaders and creators in the Python community. I bring that perspective to all the courses I create.

 2. I've been a professional software trainer for over 10 years. I have taught literally thousands of professional developers in hundreds of courses throughout the world.

 3. Students have loved my courses. Here are just a few quotes from past students of mine.

"Michael is super knowledgeable, loves his craft, and he conveys it all well. I would highly recommend his training class anytime." - Robert F.
"Michael is simply an outstanding instructor." - Kevin R.
"Michael was an encyclopedia for the deep inner workings of Python. Very impressive." - Neal L.

Free office hours keep you from getting stuck

One of the challenges of self-paced online learning is getting stuck. It can be hard to get the help you need to get unstuck.

That's why at Talk Python Training, we offer live, online office hours. You drop in and join a group of fellow students to chat about your course progress and see solutions via screen sharing.

Just visit your account page to see the upcoming office hour schedule.

Is this course based on Python 3 or Python 2?

This course is based upon Python 3. Python 2 is officially unsupported as of January 1st, 2020 and we believe that it would be ill-advised to teach or learn Python 2. This course is, and has always been, built around Python 3.

The time to act is now

Learn why people are so excited about Cookiecutter and take your projects to the next level by creating your own Cookiecutter templates.

Course Outline: Chapters and Lectures

Welcome to the course
14:24
Welcome and what is Cookiecutter
4:51
What you will learn
4:40
The Cookiecutter philosophy
2:13
Get the source code
0:35
Video player: A quick feature tour
2:05
System setup and installing Cookiecutter
16:48
Prerequisites (Python and an editor)
2:06
macOS Setup
3:49
Windows setup
4:08
Linux setup
5:07
Installing and upgrading Cookiecutter
1:38
Getting started using Cookiecutter
14:38
Browsing the existing Cookiecutter templates
2:53
4 examples in the pantry
2:57
Demo: Creating a project
4:13
Local cookiecutters
1:53
Concept: Running a template
2:42
Advanced Cookiecutter usage
20:08
The full CLI
4:11
No inputs
1:41
Verbose
1:29
Default values
0:30
Setting up default values
3:24
Concept: Default values
3:10
Careful with that YAML file
1:03
Extra defaults
1:09
Instant replays
2:30
Concept: Replay
1:01
Creating Cookiecutter templates
1:00:24
Why create your own template
4:21
A bare template
8:14
Concept: Bare template
2:46
Demo: Dependent values
3:34
Concept: Dependent values
2:11
Default values and required values
3:31
Concept: Required values
1:41
Demo: Choice values
2:03
Concept: Choice values
1:08
Template extensions
3:52
Concept: Extensions
1:28
Shipping files without processing them
1:36
Demo: pre-generation hooks
7:57
Concept: pre-generation hooks
2:52
Demo: post-generation hooks
6:36
Helper text via post-generation hooks
2:55
Concept: post-generation hooks
1:22
The meta template
2:17
Programmatic Cookiecutter: Using the API
19:35
Why the API?
2:09
Introducing the game maker
2:10
Gathering game maker data
5:28
Executing the template
7:32
Concept: Cookiecutter API
2:16
Case studies: Major projects using Cookiecutter
10:28
Introducing the case studies
1:34
Case study: Beeware
3:43
Case study: OpenStack
1:51
Case study: Pyramid
3:20
Sharing your Cookiecutter template with the world
15:17
Sharing your template
0:44
Step 1: Have a template
4:08
Step 2: Add your listing
3:16
Step 3: Creating the pull request
4:08
Concept: Sharing steps
3:01
Adding features to Cookiecutter
28:05
Modifying Cookiecutter
2:35
Getting modifiable source
1:23
Running Cookiecutter locally
4:27
Preparing source for the feature
2:35
Adding the feature
8:11
Creating the PR
4:14
Concept: Modifying cookiecutter
4:40
Conclusion
5:20
Finish line
5:20
Buy for $49 + tax Bundle and save 85% Team Gift

Questions? Send us an email: contact@talkpython.fm

Talk Python's Mastodon Michael Kennedy's Mastodon