Modern Python Projects Transcripts
Chapter: Let's build a package
Lecture: Start with a cookiecutter template
0:00 The first step in our project is to find a cookie cutter template that we're going
0:04 to use. Okay, there is actually Step 0 where we have to install cookie
0:09 cutter on our computer. But as you can see,
0:11 I have already done it, in the past chapters.
0:14 If you don't have cookie cutter,
0:16 you can run pip install cookie-cutter or pipx install cookie-cutter and you're
0:21 all set. So now let's go to the Git Hub page of cookie cutter and
0:25 find the list of available templates.
0:29 So, we go here and search for Pantry.
0:34 So we go here and here we can see all the repositories tagged with cookie cutter
0:39 Let's search for a package,
0:42 since building a Python package is a popular thing to do.
0:46 It's one of the very first cookie cutter templates that we see,
0:50 and it actually has a lot of stars,
0:52 so that's probably the one we want to use.
0:55 Let's go inside and see the list of features that it offers, out of the box
1:00 will have pytest, which is good.
1:01 Travis-CI, which I don't really care about, tox if you want to
1:06 make sure that your package works with different python versions,
1:09 Sphinx that were going to use.
1:11 So, that's good. bump2version, which is a tool that you can use to bump
1:15 versions, when you want to release a new version of your package.
1:19 There is also feature to Auto-release pypi when you push a new tag to
1:23 master, which is quite interesting,
1:26 but it's a bit more advanced features,
1:27 so I'm not going to use it.
1:29 And although CLI interface using click,
1:32 which we already have, so that's not good nor bad all in all it looks
1:37 like a pretty solid and standard.
1:39 python package cookie cutter template,
1:41 so let's use it. So here I have the empty directory and I'm going to
1:46 run my cookie cutter here, again,
1:52 we have a set of questions that we have to answer.