from waitress import serve code example
Example 1: waitress serve
from flask import Flask
import waitress
app = Flask(__name__)
port = 5000 # This can be anything
# Lines of code for the web app
if __name__ = "__main__":
waitress.serve(app=app, port=port)
Example 2: python waitress
from waitress import serve
serve(wsgiapp, listen='*:8080')