Registry / web-framework / flup
library1.0.3pypypi✓ verified 85d ago

A random assortment of WSGI server implementations (CGI, FastCGI, SCGI, AJP) for Python 3. Version 1.0.3 is the latest, released in 2019. The project is in maintenance mode with no active development.

pip install flup
INSTALL
IMPORT
SIG · FLUP
F
flup
web-frameworkpythonv1.0.3
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.2MB
glibc
py 3.103.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()
Debug
Known issues
gotchaImport paths differ between versions: in flup < 1.0, classes were directly under flup.server.* (e.g. flup.server.fcgi.FCGIServer); in 1.0+, use flup.server.*.WSGIServer.
fix
Use 'from flup.server.fcgi import WSGIServer' instead of 'from flup.server.fcgi import FCGIServer'.
affects: >=1.0.0
gotchaThe server's run() method is blocking; to integrate with async frameworks, you need to manage threading yourself.
fix
Wrap the server.run() in a thread if you need non-blocking operation.
affects: *
deprecatedFlup has no official Python 3 support beyond basic CGI. The package is unmaintained; consider alternatives like gunicorn or uWSGI.
fix
Migrate to gunicorn (pip install gunicorn) or uWSGI for production use.
affects: *
gotchaWhen using FastCGI, the bindAddress must be a Unix socket or TCP tuple. Using a string (e.g., '127.0.0.1:8080') will raise an error.
fix
Use a tuple: bindAddress=('127.0.0.1', 8080) or a Unix socket path.
affects: *
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'flup'
Flup is not installed in the current Python environment.
fix
Run 'pip install flup'.
AttributeError: module 'flup.server.fcgi' has no attribute 'FCGIServer'
In flup 1.0+, the class is named WSGIServer, not FCGIServer.
fix
Use '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.
fix
Use 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.
fix
Choose 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.

Agent activity
10 hits · last 30 days
node
8
Amazon
1
Resources
flup — pip install flup · libregistry