Looking for a simple Python Http/2 server, for #feditest. Not an entire framework, that would be overkill and confusing. Does such a thing exist? Or does everyone expect that #python apps serve the web via WSGI?
import http.server import socketserver PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler with socketserver.TCPServer( ("", PORT), Handler) as httpd: print( "Serving on port", PORT ) httpd.serve_forever()
@J12t the --protocol argument should allow you to set it. I'm constrained to my work environment right now so can't test to verify that you can use --protocol HTTP/2.0 as well as 1.0 and 1.1.
@J12t
The
http.server
package might fit the bill.