A Python web framework that makes the most of the
Simplates are the main attraction.
Aspen is a WSGI application, located at
aspen.wsgi.website. That’s an instance of
aspen.website.Website, configured only from the environment. If
you need more control, you can instantiate that class yourself. In any case,
here are some ways to get it on the network.
Aspen bundles its own server, called
aspen. It is suitable for production.
$ cd /path/to/my/website $ aspen Greetings, program! Welcome to port 8080.
Gunicorn is a preforking server ported from Ruby.
$ cd /path/to/my/website $ gunicorn aspen.wsgi:website 2011-05-17 17:07:53  [INFO] Starting gunicorn 0.12.1 2011-05-17 17:07:53  [INFO] Listening at: http://127.0.0.1:8000 (40170) 2011-05-17 17:07:53  [INFO] Using worker: sync 2011-05-17 17:07:53  [INFO] Booting worker with pid: 40171
Spawning is a preforking and/or prethreading server that supports graceful code reloading.
$ cd /path/to/my/website $ spawning aspen.wsgi.website (40266) *** Controller starting at Tue May 17 17:27:34 2011 Should start 4 new children (40270) wsgi starting up on http://0.0.0.0:8080/ (40267) wsgi starting up on http://0.0.0.0:8080/ (40268) wsgi starting up on http://0.0.0.0:8080/ (40269) wsgi starting up on http://0.0.0.0:8080/
<Files myfcgi> SetHandler fastcgi-script </Files>and then myfcgi is a script that looks like:
#!/bin/bash INSTDIR=/path/to/my/aspen/project export ASPEN_PROJECT_ROOT=$INSTDIR/src export ASPEN_WWW_ROOT=$INSTDIR/www source $INSTDIR/bin/activate $INSTDIR/bin/fcgi_aspen "$@"Notes: