Can you guys recommend a python web framework to build a lightweight online chat application? I would like the framework to be light, fast and secure. Preferably free (as in rms free) or at least open-source. In terms of DB functionality I may not use a database at all, but if I do it will be very minimalistic - there will be no chat history, but I am considering user accounts.
Of course, you have Django, perhaps the most well known python web framework - although I’m not too big a fan.
I have to say that Tornado looks very appealing.
I would also recommend taking a look at Socket.IO, if you haven’t already - you may want to use SocketTornad.IO which I found from a quick search (so you may want to do more research on Socket.IO + Tornado)
Seems like it’s a pretty old framework, optimized for Python 2. Are you sure it’s a good idea for Python 3.6?
According to the video from @Dynamic_Gravity Django looks like it comes with too much stuff and has a steep learning curve which is unnecessary for building small and minimalistic applications. Is this why you dislike Django?
Tornado looks like it’s optimized for speed, but it claims to scale well up to tens of thousands of simultaneous connections. So if you have a million users online at the same time then how would it handle them?
Plus it’s the slow-ish on some of the tests here: https://klen.github.io/py-frameworks-bench/
Flask seems quite interesting, but is it open-source? Wiki says nothing about that.
Another thing which surprised me is that it’s not particularly fast even though it’s quite minimalistic: https://klen.github.io/py-frameworks-bench/
I am just enthusiastic about performance. Why not go as fast as possible?
Trying to build a great product. Sanic seems to be inspired by Flask so I am thinking about learning Flask first and then Sanic.
The reason I say stick with flask, is the amount of documentation and extra packages that you have available. Its basically as big as django, but more beginner friendly. The hello world example takes 5 lines of code to get a server with routing started.
Also, you don’t use python for performance. IF you want something like that you need to look at webassembly.
I do have to admit, Flask or Django are probably better suited for your use case though. The huge benefit of Twisted is the protocol development aids and the perspective broker. (things that are only needed if you’re building a client and server in python)