Skip to main content

utilities to help bootstrap deployment of WSGI applications using isapi-wsgi

Project description

Introduction

ISAPIWSGIHelper is a small command line script and some helper utilities to help bootstrap deployment of WSGI applications using isapi-wsgi with Microsoft IIS.

Prerequisites

The following should be installed:

  • Python

  • Python Win32 Extensions

In addition, python’s scripts directory should already be in your path. If commands like easy_install or pip already function, you should be good to go.

You should be familiar with IIS and how to load ISAPI extensions into websites and virtual directories. You should be familiar with isapi-wsgi setup.

Dependencies

  • argparse

  • isapi_wsgi

Install

easy_install ISAPIWSGIHelper or pip install ISAPIWSGIHelper will get the job done.

Note: ISAPIWSGIHelper should be installed in python’s site-packages directory, not in a virtualenv.

Usage

The “iwhelper” command is installed when installing the ISAPIWSGIHelper package.

A virtualenv is recommended, but not required:

> cd c:\somewhere\myproj-venv

> virtualenv .

> iwhelper

The above will result in a virtualenv with the addition of a isapi-wsgi directory in the root of the venv. Edit isapi-wsgi\\appinit.py according to the comments in that file.

Then, setup your website or a virtualdirectory with a wildcard mapping that uses isapi-wsgi\\__loader.dll.

Features

The isapi-wsgi directory created by the iwhelper command results in a setup with the following features:

  • Easy creation of per-project isapi-wsgi bootstrap directories through the

    iwhelper command (see above)

  • Exceptions are caught and handled appropriately. No more cryptic 500 status

    responses from IIS.

    • exceptions instantiating the application are initially hidden but can

      be displayed to the browser with a configuration change in _loader.py.

    • exceptions encountered when making a request to the application are

      logged to a file in the isapi-wsgi directory.

  • appinit.py provides a simple bridge between isapi-wsgi and your application

  • appinit.py provides a mechanism for loading a virtualenv’s site-packages dir

Special Troubleshooting w/ _loader.py:

If push comes to shove and you just can’t figure out why your application isn’t working, _loader.py provides a special mechanism for running your setup in a python web server which will give you better exception messages and automatic reloading of your python files when they are changed. See the note at the bottom of _loader.py for details.

A Note About App Pools

I use a different app pool for each python website. When troubleshooting, I set the app pool to auto-recycle after one request. This is a close equivalent to auto-reloading in various python development web servers. Just remember to turn it off before going to production usage or your performance will suffer tremendously.

Questions & Comments

Please visit: http://groups.google.com/group/blazelibs

Current Status

Works for me. :)

The development version is installable with easy_install ISAPIWSGIHelper==dev.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

ISAPIWSGIHelper-0.1.1.zip (11.8 kB view details)

Uploaded Source

ISAPIWSGIHelper-0.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

ISAPIWSGIHelper-0.1.1-py2.7.egg (11.5 kB view details)

Uploaded Source

File details

Details for the file ISAPIWSGIHelper-0.1.1.zip.

File metadata

File hashes

Hashes for ISAPIWSGIHelper-0.1.1.zip
Algorithm Hash digest
SHA256 2f95aa824e776f3fb2db692d135e56572aa8e3eaec904a8bc21fbfdb054c049b
MD5 5c6e03e777f3976c065b518f74c3e40d
BLAKE2b-256 458c2226ecdd02016c39ed4b8250155b1cc42370f9c2fcd86d9a183abe6c540e

See more details on using hashes here.

File details

Details for the file ISAPIWSGIHelper-0.1.1.tar.gz.

File metadata

File hashes

Hashes for ISAPIWSGIHelper-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2dafd7372c577f34a23e1af9308d48da8da520aa89381136ae814ca791f84e29
MD5 9f98c6f65688c88e87a9a50fe57dde7f
BLAKE2b-256 e41a8710df29204d5a7d562eee9784be907a7b79bf247699e58b87a6ba792fde

See more details on using hashes here.

File details

Details for the file ISAPIWSGIHelper-0.1.1-py2.7.egg.

File metadata

File hashes

Hashes for ISAPIWSGIHelper-0.1.1-py2.7.egg
Algorithm Hash digest
SHA256 ce762cb109e15d8f35b618741c0550fb3b4dfb3b67f164539e05d526c75198f1
MD5 8e92a71c51d038103ba40f832437b16d
BLAKE2b-256 2496fc7497cc2abd66d15483441976c2ee515c5cdc5f1e4222fd298039b1574b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page