The choice of Request class determines how you wish to deploy your application. Albatross currently supplies two classes; cgiapp.Request for CGI deployment and apacheapp.Request for deployment using mod_python.
By placing all deployment dependencies in a Request class you are able to change deployment method with only minimal changes to your application mainline code. This is useful for development as a CGI application and final deployment inside Apache.
In theory you could develop your own Request class to deploy an Albatross application using the Medusa web server.
Future versions of Albatross will provide a Request class which for performing unit tests on your application.
All Request classes implement the same interface.
name) |
TRUE
if the field identified by the name argument
is present in the request.
name) |
name) |
) |
) |
) |
name) |
name, value) |
) |
loc) |
data) |
status) |
num) |
For example, the mod_python deployment typically uses this method in a roundabout way like this:
from albatross.apacheapp import Request : : def handler(req): return app.run(Request(req))