Skip to main content

wsgistraw (WSGI without STart_Response And Write) is a tiny Python library that simplifies coding WSGI applications and middleware by removing start_response and write from signatures of functions. This leads to a signature like:

def app(environ):
    return "200 OK", [("Content-Type", "text/plain")], ["Hello World!"]

That is, return a three-tuple of (status, headers, response).

start_response and write are very annoying in WSGI middleware. wsgistraw makes your middleware code cleaner. This is an example of a “lowercase” middleware factory:

@wsgistraw.mid_factory
def lowercase(app):
    def mid(environ):
        status, headers, response = app(environ)
        return status, headers, (s.lower() for s in response)
    return mid

What’s New

A bugfix release. Fixed a bug in app_proxy with extending an iterable with the results of write().

See Also

Release files for wsgistraw 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wsgistraw 0.1.2
File Size Uploaded
wsgistraw-0.1.2.zip 16.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wsgistraw 0.1.2
File Interpreter ABI Platform
wsgistraw-0.1.2-py2.4.egg Legacy Egg format - - Details

Total release size:22.4 kB

Release files / wsgistraw-0.1.2.zip

Download URL wsgistraw-0.1.2.zip
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fb06c32aa458939f8a3dcda6482f6d3abde7b2dee63a862e6c8ff978daf7260a
BLAKE2b-256 checksum
How to use checksums
a8267bf4c62384aacedbd1ace3d59cb2e8b88aa01b42f138c599495068a68224
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / wsgistraw-0.1.2-py2.4.egg

Download URL wsgistraw-0.1.2-py2.4.egg
Size 5.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
6b564e88d753a995bbd9f02fc5d93046c7878a49d67dc398f10de06e57d1446f
BLAKE2b-256 checksum
How to use checksums
4f42daa3065782ed1aa5a1282c11196cbca9c39f7d187d7ab20fbdc0c701ad42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1

2 release files

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