Registry / web-framework / wsgiref

wsgiref

JSON →
library0.1.2pypypiunverified

wsgiref is the WSGI (PEP 333) reference implementation, included in the Python standard library. It provides utilities for developing and testing WSGI applications, including a simple HTTP server and request/response objects. Version 0.1.2 on PyPI is outdated; the standard library version is bundled with Python 3.x. Use the standard library module instead of the PyPI package to avoid conflicts.

pip install wsgiref
INSTALL
IMPORT
SIG · WSGIREF
W
wsgiref
web-frameworkpythonv0.1.2
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

simple_server
from wsgiref import simple_server
from wsgiref.simple_server import make_server
Incorrect: make_server is a function, not a module. Correct import: from wsgiref.simple_server import make_server
util
from wsgiref import util
import wsgiref.util
Same, but acceptable: import wsgiref.util is also valid.

Basic WSGI application using wsgiref's simple server.

from wsgiref.simple_server import make_server def hello_app(environ, start_response): status = '200 OK' headers = [('Content-type', 'text/plain')] start_response(status, headers) return [b'Hello World'] with make_server('', 8000, hello_app) as httpd: print('Serving on port 8000...') httpd.serve_forever()
Debug
Known issues
deprecatedThe PyPI package 'wsgiref' is outdated and should not be used. Instead, import from the Python standard library's wsgiref module, which is bundled with Python 3.x.
fix
Remove wsgiref from requirements.txt. Use: from wsgiref.simple_server import make_server
affects: all
gotchawsgiref is for development and testing only; not suitable for production. Traps SIGINT, so pressing Ctrl+C may not stop the server gracefully on some platforms.
fix
For production, use a production-grade server like Gunicorn or uWSGI.
affects: all
Upgrade
Version history
0.1.2latest on PyPI · released Jun 12, 2006
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
30
OpenAI (training)
1
Resources
wsgiref — pip install wsgiref · libregistry