8000 GitHub - dosmoc/flup-py3: http://hg.saddi.com/flup-py3.0/ updated for Python 3.4+ (but please use WSGI!)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dosmoc/flup-py3

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flup-py3 for Python 3.4+

flup-py3 fork and updated for Python 3.4+.

Please note that WSGI is the preferable way for Python based web applications.

Installation

You may install this package by using pip for Python 3. Optionally with the help of venv.

The actual command is different among operation systems. For example, Debian / Ubuntu package name it as pip3.

Add this line to your requirements.txt:

flup-py3

Then run this command (assuming pip3):

pip3 install -r requirements.txt

Usage

A simple hello world app (reference: Python 3.4 Documentations)

import sys, os, logging
from html import escape
from flup.server.fcgi import WSGIServer

def app(environ, start_response):
    start_response('200 OK', [('Content-Type', 'text/html')])
    yield "hello world"

def main():
    try:
        WSGIServer(app, bindAddress='./hello-world.sock', umask=0000).run()
    except (KeyboardInterrupt, SystemExit, SystemError):
        logging.info("Shutdown requested...exiting")
    except Exception:
        traceback.print_exc(file=sys.stdout)

Maintenance

Github Repository: github.com/pquentin/flup-py3

About

http://hg.saddi.com/flup-py3.0/ updated for Python 3.4+ (but please use WSGI!)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0