14 ms·
Top Python libraries of 2020 you should know about
- Noumenon72 6y agoI like how they led with something of general interest -- just about anybody might want to make a command line script that requires arguments. Typer might help me get away from Bash scripts to just write in Python.
- BerislavLopac 6y agoAgreed. I've had exact same idea for quite some time now, but never got to writing it - I'm glad someone did, and seemingly in a very good manner.
- nerdwaller 6y agoEver since type hinting came about I wanted a library like typer (I had a few attempts to write one, but often lost motivation with other things). This was the first time I’ve seen it and am excited to read more into it!
- romtx 6y agoRefusing to read (in spite of my genuine interest) based on the click-baity title.
- dmurray 6y agoThe text is written in the same clickbaity style. But the libraries look pretty interesting.
- hatchoo 6y agoI second this. The libraries were actualy pretty interesting
- Threeve303 6y agoTo be fair, other than the title, I don’t think it’s written in a clickbait style. I’m not bombarded with ads and they aren’t doing the thing where you get one page per list item. And several people have found certain libraries useful.
- sxg 6y agoAs I'm writing this, the title is "Top Python libraries of 2020 you should know about". Sure, it sounds a bit click-baity, but what's a better way of writing that title? The only way to remove the clickbait element is to literally list all or several of the libraries, which would make for a terrible title.
- dongobongo 6y agoThen you should also refuse to comment.
- physicsgraph 6y agoSummary of list: * Typer * Rich * Dear PyGui * PrettyErrors - formatting and coloring error messages in the terminal * Diagrams * Hydra - build configurations in a composable manner, and override certain parts from the command line or config files. * OmegaConf * PyTorch Lightning * Hummingbird - compile your trained traditional ML models into tensor computations * HiPlot - high-dimensional data using parallel plots * Scalene * Norfair - real-time object tracking; the real reason for this post, as it is created by the company
- dekked 6y agoHi, author here. We have been doing the series of posts every year since 2016, way before Norfair was even a dream.
- deleted 6y ago[deleted]
- kranner 6y agoTo be fair the Norfair library is presented as a 'bonus' item and not part of the top 10 list. Even as self-promotion it seems relevant and fair.
- Der_Einzige 6y agoDearPyGUI is awesome, and I hope that people don't use it en-mass so that my side-projects using it have an easy time getting a lot of attention because of it!
- petters 6y agoI've been using Python a lot, both professionally and privately. Been contributing to Cpython. Not sure I like the language. The best dependency manager (Poetry) is buggy. The default interpreter is slow. But I love the ecosystem of third party packades. Thank you! Python will be around for a long time.
- kamyarg 6y agoCurious what bugs you have come across with poetry?
- saila 6y agoIn the current version, 1.1.4, if your package has optional dependencies (AKA "extras"), the generated package metadata is incompatible with setuptools (specifically the packaging package, which can't parse the requirement specs generated by poetry), so I've had to stick with 1.0 for now. I've encountered a few issues like this since I started using poetry 0.12.
- kamyarg 6y agoThanks for sharing, indeed that is very bad. Do you know if this bug is already reported?
- petters 6y agoRace conditions in the installer. The parallel installer must be disabled. But generally I like poetry and I am also a contributor (--remove-untracked). Don't want to bash it to much.
- kamyarg 6y agoI also like and use it and have been trying to compare it with pipenv(which we switched from). To be honest it has been nothing but very pleasant to use and I am surprised when people have issues(maybe we have those issues and I am not aware?). I have not had any issues with installer race conditions, did I miss, was lucky or you had a special case it surfaced maybe?
- mark_l_watson 6y agoThanks for putting that together. Great list! I use Hy (a thin Lisp skin/wrapper for Python) for a few personal projects (not at work) and great libraries help make applications shorter and easier to maintain. Best code to write is no code.
- jedberg 6y agoThank you to the author of this list. I pay pretty close attention, and yet most of these libraries were new to me and I can see myself using 1-5 right away! This was a great list.
- dekked 6y agoI am glad it was of help! We put a lot of effort every year into these lists.
- atomicnumber3 6y agoIf Dear PyGUI uses immediate mode, does it perhaps have the makings of a game library? I looked briefly at pygame a while ago and was dissuaded when using hardware surfaces seemed to be black magic in the opinion of many users of the library, and using software rendering nets you a max of like 25fps if you do nothing but blit black across the entire screen. Does anyone know if pygame is still the state of the art for python game dev?
- toulaboy3 6y agoIt would be much higher than 25 fps for sure. I would say it could stand a fair chance for some starter level 2d games to hit 60fps or higher easily. However that is not the intended use case the library at the moment, it currently aims at giving a face to scripts and med-large applications. But it wouldn't be bad introduction to the idea of having to deal with frames and a render loop and logic loop ect for a beginner!
- Doxin 6y agoPyGame recently released a new version based on SDL2 instead of SDL. I don't know if it's actually faster but given that SDL2 focuses on accelerated rendering I'd imagine so. Worth checking out in any case. Just in case it's still as slow as ever: there's perfectly fine SDL2 bindings for python, so if you use those at least the slowness will be your own fault.
- toulaboy3 6y agoGreat list!
- Def_Os 6y agoLike every year, a thoughtful and helpful list. Thank you, Tryo labs. I've left the ecosystem for the JVM, professionally, so a nice way to keep up with what's going on in Python land.
- krick 6y agoAbsolutely off-topic, but can somebody advise on the best resource to learn the most up-to-date Python for somebody who is mentally stuck on Python 2.7-3.2? I always referred to Python when I needed to quickly write some tool for personal use, but never professionally, even though I am a professional programmer. And recently while writing something like this I was struck with how bad my Python actually is in 2020, compared to how other languages I know currently look. Quick lookup shows that it seemingly has pretty powerful typehints system now, but I never used it. I have no idea, which parts of standard library you aren't supposed to actually use anymore, and use some well-established 3rd part library instead (like it was with requests). And stuff like that. And is it even a good idea, to finally switch to the newest versions of Python and to never look back? So, basically, what's the best way to catch up?
- ghshephard 6y agoI"d strongly recommend Trey Hunner at PythonMorsels. The approach is to give you a concise problem that should exercise some part of your python knowledge, and have you write code, re-write your code, bang your head against a problem, and then, once you've written something that passes all the unit tests, you get a walk through possible solutions by someone who knows python well. Trey starts with a description of how you might solve the problem (which is about how I solved the problem 50% of the time) that is almost always clearly wrong, even though it "works" - then he shows you a somewhat more pythonic and modern way - and you go, "aha!", and then, he shows you the elegant solution - and it changes your life, and you use that pattern in everything you write. His focus though, is really on how to write clean pythonic 3.x code more than the latest and greatest features, but he tags his problems/solution sets, so if you really want to dive into decorators, or context managers, or dunder methods - you can zoom right in. The only problem I've had with Python Morsels is I look at the code I wrote a year ago (I'm not a developer) and I'm embarrassed and ashamed at how gross it was.
- neoncontrails 6y agoI wholeheartedly endorse The Python Cookbook by David Beazley. It's almost a decade old, but hasn't aged a bit. Its "recipes" are practical, elegant, and often somewhat cheeky: I'm thinking in particular of a puckish trick he uses to lazily interpolate variable bindings into a format string automatically by resolving it in the context of previous stack frames (helpfully packaged as a modular function that emits nice errors), and another to tamper with the restrictions of the GIL by executing threaded computations in separate interpreters. But while the book is loaded with black magic, it's also the first place I turn when trying to refresh myself on more quotidian topics like navigating a filesystem, making subprocess calls, overriding class instance behavior with magic methods, etc.
- easterncalculus 6y agoRich is a really nice library. Glad to see it here.
- saila 6y agoTyper looks cool. I really like the idea of just writing functions to create command line scripts rather than using argparse. Here's another library that takes a similarish approach using annotations, although it's not quite as polished: https://pypi.org/project/runcommands/ https://pypi.org/project/runcommands/
- gen220 6y agoHaving not used typer, your description is reminiscent of fire [1], which has worked well for our purposes. [1]: https://github.com/google/python-fire https://github.com/google/python-fire
- luord 6y agoTyper and specially diagrams look like will be pretty handy for me in the near future. Don't know how I missed then. Thanks for the list!
- est 6y agoNeed to see more eBPF mentions.
- choicenotchance 6y agoExcept for Pretty Errors, nothing else is useful for me. And why are so many packages related to ML/AI? Is there no development for anything else anymore?
- vladimirsvsv77 6y agoPrettyErrors is great! Thx)
- holri 6y agoIs there a list of those that were hip 10 years ago, and if they are still properly maintained today?