Recommended python library/framework for local web app?

前端 未结 10 1840
生来不讨喜
生来不讨喜 2020-12-31 07:33

I want to create a simple LOCAL web app in Python.

The web server and \"back-end\" code will run on the same system (initially, Windows system) as the UI. I doubt it

10条回答
  •  独厮守ぢ
    2020-12-31 08:23

    A very simple server in the standard library is wsgiref.simple_server.

    The example looks trivial (demo_app is also part of the module):

    from wsgiref.simple_server import make_server, demo_app
    
    httpd = make_server('', 8000, demo_app)
    print("Serving HTTP on port 8000...")
    
    # Respond to requests until process is killed
    httpd.serve_forever()
    

提交回复
热议问题