Top Python libraries of 2016
tryolabs.com
tryolabs.com
I keep looking for excuses to focus on Python instead of Go and claims like this one make me happy. However, when I check the benchmarks I get confused:
http://www.techempower.com/benchmarks/#section=data-r13&hw=p...
Of course this looks amazing:
https://magic.io/blog/uvloop-blazing-fast-python-networking/
But, even if in the request/second area Python might be doing great now, won't there be problem down the line with the GIL? That is, isn't async/await an island of good performance?
I also heard that CPython is slower than assembler. I'm not sure why that is?
Yes, you'll probably have to move the really work down to a cluster based job queue.
If you want parallelism in pure Python code, you don't use multiple threads.
However, Go and Java will handily beat Python any day, even with uvloop -- all you need to do is try to do a little more processing inside your HTTP handler, aaaaannnnddd thiiiingggsss willl sloooowww dooooowwwwnnnn....
TechEmpower uses gunicorn/nginx [1] for Python frameworks, and has since 2014.
>> all you need to do is try to do a little more processing inside your HTTP handler
Unless you're working with an external service like a relational database, in which case performance between Go/Java and Python will be comparable [2]. If you don't need to leave your process, Go/Java will flatten Python.
[1] https://github.com/TechEmpower/FrameworkBenchmarks/tree/mast...
[2] https://www.techempower.com/benchmarks/#section=data-r13&hw=...
It's pretty good.
The async/await thing is still a bit half-baked (I can't wait for 3.6 to arrive with more bits, including async generators), but I can see myself using this more and more -- just don't expect Go-like performance from this setup for anything but simple processing, since Python is still slow (and 3.x all the more so until PyPy 3 becomes a reality).
As to the rest of the libraries mentioned, I can't really fault the selection. I'm still using Python largely because of the ecosystem and sane deployment options, so I'm always happy to find new, decent libraries.
Am I the only one who finds the programming style of using async/await inferior to that of gevent?
Is that an issue for anyone else -- that you can't remember all these libraries exist when you need them?
I guess that what awesome-{python, PHP, golang, etc} are for, right?
Yep. I just star them on github and hope that when I need one, I can remember that I starred something like that some time ago. It has worked a few times. But surely there must be better ways?
> I guess that what awesome-{python, PHP, golang, etc} are for, right?
Not sure. There are some cool ones but plenty of them are pretty crappy dump of links of very varying quality for the internet points (i.e. github stars) :/ (no offense to people who publish them!)
I'm teaching a Python class in winter and put down all the libraries I could think of that I might need (on top of Anaconda 4.x)...probably will serialize this later: https://gist.github.com/dannguyen/9e5082ac6a80590bfe1541952f...
Planning to use AWS significantly this quarter, so awscli and boto3 are at the top of my list.
I wish someone would make an app that merged Github, Bitbucket, Gitlab, Pinboard and similar dev-oriented collections.
Pretty good for a non-native app ;)
Anybody want to volunteer to start a resource page for python, kind of like this one for elasticsearch? https://github.com/dzharii/awesome-elasticsearch
Hug appears to be one of those things that is great when all you're doing is very simple but quickly turn into morass of fighting the opinions and magic of framework when doing anything "real".
Also (good) CLI is so different than HTTP that I see only sadness in mashing them into same interface. like having to repeat large amounts of boilerplate decorators to get it to do what you need. The chaining seems it would help with boilerplate at least.
Still, I hope I'm wrong. I want to have a hug. Falcon's lack of validation and documentation means it solves only about 10% of the problem.
Hug also exposes directives, formatters and middleware for you to dive into the nitty gritty - not much magic. Just standard simple decorators.