PyISAPIe with Flask

169 views
Skip to first unread message

Jamie Jackson

unread,
Jul 21, 2011, 8:55:28 AM7/21/11
to PyISAPIe
I'm new to Python, WSGI, and PyISAPIe, so this might be a dumb
question, but I can't find documentation for hooking IIS to Python.

I am using straightforward CGI to provide a web service, but it
imports a heavy module (arcpy, which takes 4 seconds to import) on
every request, which slows response time and reduces concurrency
capacity. I'm hoping to improve performance under load with WSGI.

Can you give me some pointers as to how to get this going? The
following isapi.py seems to at least run my script, but I can't figure
out how to share one import among different requests, etc.

Thanks,
Jamie

# #########################################

from Http.WSGI import RunWSGI
from Http import Env

from flask import Flask
app = Flask(__name__)
app.debug = True

def Request():
return RunWSGI(app)

# #################################################
Reply all
Reply to author
Forward
0 new messages