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
source repository: https://github.com/tiddlyweb/httpexceptor
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.2.1.tar.gz
(3.2 kB
view details)
File details
Details for the file httpexceptor-1.2.1.tar.gz
.
File metadata
- Download URL: httpexceptor-1.2.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e7f1f1d559c54c168a0a34ed1500a428bcab3e0a2bb0f7cc78d856c8ba24be4 |
|
MD5 | 2d735760acbc53583a2428052e22bcf2 |
|
BLAKE2b-256 | a03bd8d474e0807273587fb4e0566be51ebfe84b224c740c4aa4e78f23399893 |