Skip to main content

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')

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.1.tar.gz (3.0 kB view details)

Uploaded Source

File details

Details for the file httpexceptor-1.1.1.tar.gz.

File metadata

  • Download URL: httpexceptor-1.1.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for httpexceptor-1.1.1.tar.gz
Algorithm Hash digest
SHA256 52f7abe4523899a42c3fbabea614e7ebe89e7fcd2a3706b99ddca8da74c67f4d
MD5 85a0229eed7492cc0e972ac5dab73e95
BLAKE2b-256 b6b4d0edc4e2f3f2931bea152a38f05dec5277fef08e85e0187a0d8073dacf96

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.0

1 file

1.3.1

1 file

1.2.1

1 file

1.2.0

1 file

1.1.2

1 file

This release

1.1.1 This release

1 file

1.1.0

1 file

1.0.1

1 file

1.0.0

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page