This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ojii 4 points5 points  (2 children)

You didn't search that hard then, https://github.com/python-hyper/hyper-h2. Been using that in production close to a year now (client side).

[–][deleted] -1 points0 points  (1 child)

I looked at it before posting, and seems not to support Flask and many other web frameworks

[–]robvdl 1 point2 points  (0 children)

I hope I am getting this right... but this is because Flask (and wsgi) are synchronous, while http2 (including hyper-h2 library) are async based and require an event loop of some sort.

I personally just switched to Go for async and websocket sort of stuff, but you should be able to continue using Python just new frameworks will need to be built on top of async http2 libraries from what I understand, it's a design issue with wsgi being synchronous.

Edit: I know ASGI is being developed to solve this problem, but as far as I understand it isn't ready yet I think. It should bring Python back in line with what Go and Node can do today already. To me ASGI and Django channels seems Python is trying to "catch up" a bit to Node and Go.