How to install httpexceptor
- Download and install ActivePython
- Open Command Prompt
- Type
pypm install httpexceptor
Depended by
- tiddlyweb
- tiddlywebplugins.console
- tiddlywebplugins.csrf
- tiddlywebplugins.differ
- tiddlywebplugins.etagcache
- tiddlywebplugins.form
- tiddlywebplugins.hoster
- tiddlywebplugins.links
- tiddlywebplugins.openid2
- tiddlywebplugins.privateer
- tiddlywebplugins.reflector
- tiddlywebplugins.socialusers
- tiddlywebplugins.static
- tiddlywebplugins.tiddlyspace
- tiddlywebplugins.whoosher
- tiddlywebplugins.wimporter
Lastest release
httpexceptor
WSGI middleware to handle HTTP responses using exceptions
provides a group of exception classes representing non-2xx HTTP statuses, along with a WSGI middleware to turn the exceptions into proper HTTP headers
originally extracted from TiddlyWeb
source repository: https://github.com/tiddlyweb/httpexceptor
Usage
from httpexceptor import HTTPExceptor, HTTP404 # register middleware app = HTTPExceptor(app) # ... if unavailable: raise HTTP404('resource unavailable')