spyce
home
license
community
download
examples
resources
wishlist
contrib (@sf)
documentation
intro
lang
runtime
modules
tags
install
exits
sourceforge
statistics
freshmeat

Documentation - Runtime
[[ Spyce ]]
Python Server Pages
by Rimon Barr

Prev: 3.2 - Code Transformation Up: 3 - Runtime Next: 3.4 - Static Content

3.3. Dynamic Content

The most common use of Spyce is to serve dynamic HTML content, but it should be noted that Spyce can be used as a general purpose text engine. It can be used to generate XML, text and other output, as easily as HTML. In fact, the engine can also be used to generate dynamic binary data, such as images, PDF files, etc., if needed.

The Spyce engine can be installed in a number of different configurations that can produce dynamic output. The first three options exhibit high performance; the CGI approach is slowest, since a new engine must be created for each request:

  • mod_python: Apache module that runs a Python interpreter in-process
  • FCGI: A CGI-like method that does not incur the large process startup overhead on each request
  • webserver: The engine can operate as a proxy webserver, serving requests redirected to it by a primary server. It can also operate as a primary server, although this webserver is extremely feature poor.
  • CGI: Spyce can interoperate with any webserver that supports CGI. The CGI-mode, while the slowest alternative, is especially convenient during the development of Python modules, ensuring that modules always get reloaded. Another alternative is to use the debug configuration switch.
  • Others: Spyce abstracts its operating environment using a thin indirection layer. Spyce users have written small Spyce adapters for the Xitami webserver and also to integrate with the Coil framework. Writing your own adapter, should the need arise, is therefore a realistic possibility.

Prev: 3.2 - Code Transformation Up: 3 - Runtime Next: 3.4 - Static Content


© 2002-05 Rimon Barr
email: rimon@acm.org
Spyce Powered SourceForge Logo [[ Spyce ]]
Python Server Pages
version 1.3.13