WSGI middleware to handle HTTP responses using exceptions
Project description
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
Usage
from httpexceptor import HTTPExceptor, HTTP404 # register middleware app = HTTPExceptor(app) # ... if unavailable: raise HTTP404('resource unavailable')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
httpexceptor-1.1.2.tar.gz
(3.0 kB
view details)
File details
Details for the file httpexceptor-1.1.2.tar.gz
.
File metadata
- Download URL: httpexceptor-1.1.2.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | affd135a2cd6235187ab57187e2d96dcd40d4344c2b102056ec8931544e0bd73 |
|
MD5 | c61df5c0e781ef03a807a4f579b1f9b7 |
|
BLAKE2b-256 | b6e413a6575555bb42b66d4dfeee54742c44f9e12a9b7b81195a2ad0ca7db3f8 |