Getting started quickly on a Python application requires, as we just saw, several steps. Like other popular web frameworks, Pyramid provides a facility called “scaffolds” that let you quickly generate the basics of a Pyramid application.
We don’t need to copy the previous step. Instead, just make an empty new directory:
(env33)$ cd ..; mkdir step04; cd step04
See the usage for pcreate:
(env33)$ pcreate --help
List the available scaffolds:
(env33)$ pcreate --list
Make a new Python project called tutorial using starter as a starting point:
(env33)$ pcreate -s starter tutorial
Visit that project and see the project contents:
(env33)$ cd tutorial; ls
Install your new project:
(env33)$ python3.3 setup.py develop
Run the WSGI application with:
(env33)$ pserve development.ini
Open http://127.0.0.1:6543/ in your browser. Different port number!
Pyramid has a number of scaffold templates that provide different starting points. starter is the most basic. alchemy is useful for developers wanting SQLAlchemy as a starting point. These scaffolds provide a way for Pyramid to remain unopinionated, but still provide starting points with a set of opinions.
When you visited this project in your browser, you might have seen the pyramid_debugtoolbar in action. This is a handy helper during development.
The remaining steps in this tutorial do not use scaffolds, as we want to teach the various decisions being made.