Neil Schemenauer, 2012
This code was tested with Quixote 2.8b1 and Flask 0.9-dev (git commit 04bb720d3813c8cfe3ae46d2fb85dbc9a03a9b70).
The easiest way to test this application is with mod_scgi. The following Apache directive will enable the SCGI application:
SCGIMount /quixote 127.0.0.1:3000
Run "python quixote_app.py" to start the application server.
To run Flask with mod_scgi, I created a quick WSGI adaptor for my 'scgi' package. You can download it from:
http://python.ca/nas/python/wsgi_handler.py
It should be put in the 'scgi' package directory. The script to run the Flask app is simple (defaults to listening on port 3000):
from flask_app import app
from scgi.wsgi_handler import run
if __name__ == '__main__':
run(app)
I don't have a EC2 setup to test with so I compared the Flask version on my workstation. Flask is fairly similar in spirit to Quixote. Quixote's templating system should be faster.
Framework | Reqs/sec |
---|---|
Quixote/SCGI (2.8b1) |
|
Flask/SCGI (0.9-dev) |
|
Flask/WSGI (0.9-dev) |
|
Framework | Reqs/sec |
---|---|
Quixote/SCGI (2.8b1) |
|
Flask/SCGI (0.9-dev) |
|
Flask/WSGI (0.9-dev) |
|
Framework | Reqs/sec |
---|---|
Quixote/SCGI (2.8b1) |
|
Flask/SCGI (0.9-dev) |
|
Flask/WSGI (0.9-dev) |
|