GNU Terry Pratchett for WSGI
Simple WSGI middleware for adding Terry Pratchett’s header to your requests per the conversation that’s happening on reddit
WSGI middleware is pretty simple. Wrap your WSGI application in an instance of GNUTerryPratchett and you’re set.
from pratchett import GNUTerryPratchett # ... your code here, create your WSGI application app = GNUTerryPratchett(your_app)
When using PasteDeploy configuration files you can also add the middleware there.
# Your main application [app:main] filter-with = pratchett [filter:pratchett] use = egg:wsgi-pratchett
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.