3 ms·
I'd personally use Twisted, but I'm biased insofar as I helped develop it. It has both equivalent of Javascript promises (called Deferreds) and ability to inter
by itamarst 9y ago
I'd personally use Twisted, but I'm biased insofar as I helped develop it. It has both equivalent of Javascript promises (called Deferreds) and ability to interact with them using async/await if you like that idiom more (http://twistedmatrix.com/documents/current/core/howto/defer-intro.html#coroutines-with-async-await http://twistedmatrix.com/documents/current/core/howto/defer-...).
But that's just me.
Given limited protocol needs, I suggest skimming docs for asyncio, Twisted, and Tornado and seeing which seems to make the most sense to you. For Twisted HTTP client and server to look at are Treq (https://treq.readthedocs.io/en/release-17.8.0/ https://treq.readthedocs.io/en/release-17.8.0/) and Klein (https://klein.readthedocs.io/en/latest/ https://klein.readthedocs.io/en/latest/).