Install & Compatibility
Where this runs
tested against v1.0.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CGIServer
✓ from flup.server.cgi import WSGIServer as CGIServer
✗ from flup.server.cgi import CGIHandler
CGIHandler is for old CGI scripts, not WSGI; use CGIServer for WSGI+CGI.
FastCGIServer
✓ from flup.server.fcgi import WSGIServer as FastCGIServer
✗ from flup.server.fcgi import FCGIServer
Old name; the correct class is WSGIServer.
SCGIServer
✓ from flup.server.scgi import WSGIServer as SCGIServer
✗ from flup.server.scgi import SCGIServer
The old import path used WSGIServer as the class name, but SCGIServer is also accepted; prefer the modern WSGIServer alias.
AJPServer
✓ from flup.server.ajp import WSGIServer as AJPServer
✗ from flup.server.ajp import AjpServer
Case sensitivity: correct class is WSGIServer.
Basic FastCGI server example using flup. The server listens on localhost:8080.
from flup.server.fcgi import WSGIServer
def app(environ, start_response):
start_response('200 OK', [('Content-Type', 'text/plain')])
return [b'Hello, World!']
server = WSGIServer(app, bindAddress=('127.0.0.1', 8080))
server.run()
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'flup'
Flup is not installed in the current Python environment.
fixRun 'pip install flup'.
AttributeError: module 'flup.server.fcgi' has no attribute 'FCGIServer'
In flup 1.0+, the class is named WSGIServer, not FCGIServer.
fixUse 'from flup.server.fcgi import WSGIServer' instead.
TypeError: WSGIServer.__init__() got an unexpected keyword argument 'bindAddress'
The keyword argument may be misspelled or not accepted in some older version; check the signature.
fixUse positional arguments or consult the documentation: WSGIServer(app, bindAddress=...). Ensure you are using flup 1.0+.
OSError: [Errno 98] Address already in use
The specified bind address/port is already occupied by another process.
fixChoose a different port or stop the conflicting process.
Upgrade
Version history
1.0.3latest on PyPI · released Feb 7, 2018
Audit
Dependencies
No dependency data recorded yet.