{"id":23754,"library":"flup","title":"flup","description":"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.","status":"maintenance","version":"1.0.3","language":"python","source_language":"en","source_url":"https://github.com/ghoseb/flup","tags":["wsgi","fastcgi","scgi","cgi","server","python3"],"install":[{"cmd":"pip install flup","lang":"bash","label":"Install flup"}],"dependencies":[],"imports":[{"note":"CGIHandler is for old CGI scripts, not WSGI; use CGIServer for WSGI+CGI.","wrong":"from flup.server.cgi import CGIHandler","symbol":"CGIServer","correct":"from flup.server.cgi import WSGIServer as CGIServer"},{"note":"Old name; the correct class is WSGIServer.","wrong":"from flup.server.fcgi import FCGIServer","symbol":"FastCGIServer","correct":"from flup.server.fcgi import WSGIServer as FastCGIServer"},{"note":"The old import path used WSGIServer as the class name, but SCGIServer is also accepted; prefer the modern WSGIServer alias.","wrong":"from flup.server.scgi import SCGIServer","symbol":"SCGIServer","correct":"from flup.server.scgi import WSGIServer as SCGIServer"},{"note":"Case sensitivity: correct class is WSGIServer.","wrong":"from flup.server.ajp import AjpServer","symbol":"AJPServer","correct":"from flup.server.ajp import WSGIServer as AJPServer"}],"quickstart":{"code":"from flup.server.fcgi import WSGIServer\n\ndef app(environ, start_response):\n    start_response('200 OK', [('Content-Type', 'text/plain')])\n    return [b'Hello, World!']\n\nserver = WSGIServer(app, bindAddress=('127.0.0.1', 8080))\nserver.run()","lang":"python","description":"Basic FastCGI server example using flup. The server listens on localhost:8080."},"warnings":[{"fix":"Use 'from flup.server.fcgi import WSGIServer' instead of 'from flup.server.fcgi import FCGIServer'.","message":"Import 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.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Wrap the server.run() in a thread if you need non-blocking operation.","message":"The server's run() method is blocking; to integrate with async frameworks, you need to manage threading yourself.","severity":"gotcha","affected_versions":"*"},{"fix":"Migrate to gunicorn (pip install gunicorn) or uWSGI for production use.","message":"Flup has no official Python 3 support beyond basic CGI. The package is unmaintained; consider alternatives like gunicorn or uWSGI.","severity":"deprecated","affected_versions":"*"},{"fix":"Use a tuple: bindAddress=('127.0.0.1', 8080) or a Unix socket path.","message":"When 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.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install flup'.","cause":"Flup is not installed in the current Python environment.","error":"ModuleNotFoundError: No module named 'flup'"},{"fix":"Use 'from flup.server.fcgi import WSGIServer' instead.","cause":"In flup 1.0+, the class is named WSGIServer, not FCGIServer.","error":"AttributeError: module 'flup.server.fcgi' has no attribute 'FCGIServer'"},{"fix":"Use positional arguments or consult the documentation: WSGIServer(app, bindAddress=...). Ensure you are using flup 1.0+.","cause":"The keyword argument may be misspelled or not accepted in some older version; check the signature.","error":"TypeError: WSGIServer.__init__() got an unexpected keyword argument 'bindAddress'"},{"fix":"Choose a different port or stop the conflicting process.","cause":"The specified bind address/port is already occupied by another process.","error":"OSError: [Errno 98] Address already in use"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}