Using and Mastering Cookiecutter Transcripts
Chapter: Getting started using Cookiecutter
Lecture: 4 examples in the pantry
Login or
purchase this course
to watch this video and the rest of the course contents.
0:01
So let's look at the examples.
0:03
Here the first one I want to talk about is Pyramid,
0:05
so Pyramid is web framework in Python, and it will create a variety of starter,
0:10
what are called scaffolds, basically all the starter code
0:13
along with associated CSS, JavaScript, image files,
0:16
and everything that you need to run this project.
0:19
The way that you create these scaffolds has always been to run
0:22
a built-in program when you install Pyramid called pcreate,
0:26
so a little bit like the manage.py in Django.
0:28
Now, in the most recent version of Pyramid 1.8.1 maybe 1.8.0, anyway,
0:34
very recently, they just switched to deprecate their own built in scaffold generator
0:39
and the recommended way to create new Pyramid projects going forward
0:42
is to actually use Cookiecutter, so one of them is pyramid-cookiecutter-starter
0:47
and that is basically the most plain and simple Pyramid web app,
0:51
they have other ones based on SQLAlchemy and things like that.
0:54
So this started project is in that pantry full of Cookiecutters, what's next?
0:57
Reproducible science, so check this out, look how cool this is,
1:01
so there is a Cookiecutter calledcookiecutter-reproducible-science,
1:05
and the idea is to have a very well known agreed upon structure,
1:10
for how you submit reports so if you are going to do some kind of research
1:13
that has computation behind it, then you will want to create one of these
1:18
and use this structure so that other people can go in and find your code and run it,
1:22
so here you can see they have things like the data that comes in,
1:25
the internal, the process, the raw data, the external data, the docs,
1:30
the notebooks, the reports, reports are like your papers, things like that,
1:34
as well as the source code that you might have used to generate these papers,
1:38
so how cool is that, if you're a scientist or some kind of academic
1:41
this is a really cool thing to get started with.
1:43
Now, how is that for a blast from the past, Atari 2600,
1:46
anybody want to play some Pitfall- I remember playing this when I was a kid,
1:50
I loved this game, and in fact, I am sure there are still Atari 2600s out there,
1:55
but more importantly, there is probably emulators that you can get and run,
1:58
so you can go and get cookiecutter-atari2600 and that will give you
2:02
the assembler code that then you compile and can run on your Atari emulator,
2:07
so if you are feeling nostalgic, you want to ride an old school computer game
2:10
the hard way, with assembly code, here, give it a shot.
2:14
Finally, let's look at the meta template, so the Cookiecutter as Cookiecutter,
2:18
here is a really nice Cookiecutter called cookiecutter-template
2:22
and we're going to come back and look at this a number of times over,
2:26
the idea is if I want to create a Cookiecutter project myself,
2:30
I want to create a Cookiecutter template myself,
2:32
I can use Cookiecutter on this thing
2:35
and it will generate the exact project structure
2:38
recommended for creating a Cookiecutter template,
2:41
so there is a lot of cool things going on here we're going to study it
2:45
when we get into building your own templates, but for now,
2:48
just know if you want to get started with different things like Atari,
2:51
with data science, or even with creating your own Cookiecutter template,
2:54
there is a Cookiecutter template for it.