skip to navigation
skip to content

Not Logged In

httpexceptor 1.2.1

WSGI middleware to handle HTTP responses using exceptions

Latest Version: 1.3.1

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')
 
File Type Py Version Uploaded on Size
httpexceptor-1.2.1.tar.gz (md5) Source 2013-09-01 3KB
  • Downloads (All Versions):
  • 22 downloads in the last day
  • 99 downloads in the last week
  • 609 downloads in the last month