#100DaysOfWeb in Python Transcripts
Chapter: Days 37-40: Introduction to Pyramid framework
Lecture: Creating the app: Via PyCharm

Login or purchase this course to watch this video and the rest of the course contents.
0:00 You've seen how to create a project using a command line. Now, I personally prefer that way. I like a lot of control over my projects, and so on.
0:10 But when I was new to Python, I very much appreciated PyCharm's help creating these projects. So you may like that much better.
0:18 So if you're using PyCharm, let's just go really quickly through how to get started with Pyramid, there.
0:22 So this is actually going to be quite easy, right? So click on create new project and we get a choice, we can go down and find Pyramid.
0:30 And it says we're going to create a new virtual environment and let's put this on the desktop/bill-pro let's just call it bill-pro.
0:41 So it's going to create a new virtual environment for us right there, and it could even could have it use Pipenv or Conda if you rather
0:48 we'll just let it do it this way. So that's going to be based on 3.7 that's what we want. So this is the go to the command line
0:55 create the virtual environment. And then the cookiecutter part is down here so what scaffold do you want to use
1:02 you don't get all of them here, you just get these three. We'll go starter, remember it asks us about whether we want to use Chameleon
1:08 it also asks us what data later we wanted to use. It's not going to ask us that. And in templates, this is fine.
1:15 We're all ready to go, we press the button we wait a moment I said it ran the setup, it actually doesn't, sorry. But it ran, at least did the install
1:24 for the base requirements of Pyramid. Now, remember we ran Python setup.py develop where we could just click this and will take care of that for us.
1:33 That'll also add the missing requirements above. It think that's about it everything's ready to go, let's check the terminal
1:38 see our virtual environment is there, and press run. Boom, should be basically the same except for the word cookiecutter probably won't appear here.
1:47 Right, welcome to this bill-pro app generated by PyCharm. Right, see we don't have quite as much control
1:52 but honestly, that doesn't really matter that much we can go back and just edit HTML and so on, here.
1:57 So we open this up again, it should look exactly the same except for the virtual environment is ignored templates are selected, and things like that.
2:04 You still will be better off if you go and mark this as a resource root and a source root. You'll get auto-complete for like
2:14 things in the static folder stuff like that in your templates. There you have it, that's how we get started with Pyramid
2:19 and we've got some structure, but not terribly lots of structure to get started with. We've got views, tests we've got our templates, couple of those.
2:30 This template is based on this sort of master template that lets us change overall look and feel of the site and then we've got our static folder.
2:39 We'll add more structure as we go now we're ready to start building out our bill tracker pro demo app using Pyramid.

Talk Python's Mastodon Michael Kennedy's Mastodon