Modern Python Projects Transcripts
Chapter: Let's build a package
Lecture: Start with a cookiecutter template

Login or purchase this course to watch this video and the rest of the course contents.
0:00 The first step in our project is to find a cookie cutter template that we're going
0:05 to use. Okay, there is actually Step 0 where we have to install cookie cutter on our computer. But as you can see,
0:12 I have already done it, in the past chapters. If you don't have cookie cutter,
0:17 you can run pip install cookie-cutter or pipx install cookie-cutter and you're all set. So now let's go to the Git Hub page of cookie cutter and
0:26 find the list of available templates. So, we go here and search for Pantry.
0:35 So we go here and here we can see all the repositories tagged with cookie cutter Let's search for a package,
0:43 since building a Python package is a popular thing to do. It's one of the very first cookie cutter templates that we see,
0:51 and it actually has a lot of stars, so that's probably the one we want to use.
0:56 Let's go inside and see the list of features that it offers, out of the box will have pytest, which is good.
1:02 Travis-CI, which I don't really care about, tox if you want to make sure that your package works with different Python versions,
1:10 Sphinx that were going to use. So, that's good. bump2version, which is a tool that you can use to bump
1:16 versions, when you want to release a new version of your package. There is also feature to Auto-release pypi when you push a new tag to
1:24 master, which is quite interesting, but it's a bit more advanced features, so I'm not going to use it. And although CLI interface using click,
1:33 which we already have, so that's not good nor bad all in all it looks like a pretty solid and standard. Python package cookie cutter template,
1:42 so let's use it. So here I have the empty directory and I'm going to run my cookie cutter here, again,
1:53 we have a set of questions that we have to answer.

Talk Python's Mastodon Michael Kennedy's Mastodon