r/Python • • Dec 21 '20

Discussion We hand-picked the best Python libraries released in 2020

Hello,

Every year, we produce a list of the top 10 Python libraries released or popularized that year.

2020 was a hard one, since there are so many good choices! Therefore, we decided we should list many more :) Most are around data science / machine learning.

The full list is available here: https://tryolabs.com/blog/2020/12/21/top-10-python-libraries-of-2020/

So:

  • What do you think about our picks?

  • Did we miss any good one? Especially non-data science libraries.

1.3k Upvotes

73 comments sorted by

View all comments

61

u/WildWouks Dec 21 '20

This is awesome. I have a application which I am struggling to get right. It will be a CLI interface. Will definitely look at typer and rich.

17

u/ChemEngandTripHop Dec 21 '20

Does anyone know how Typer compares to Fire?

13

u/mechamotoman Dec 22 '20

Having used both, I'd say typer os miles ahead

I used to think if you've got a simple project you should use Fire, and if you've got a complex project you should use Click

Not to dunk on Fire or anything, it's a solid library. The problem with it is that it only really works well for super simple CLIs. Once you get into more complicated stuff, you find yourself having to contort your codebase into knots to get it to do what you want.

Click on the other hand is really powerful, and doesn't really limit you a whole lot, but the learning curve is steep, and there's a fair amount of boilerplate you need to put in if you want a simple CLI that can scale up in complexity as needed

The problem is that these two libraries have massively different APIs and design patterns. Once you realize the Fire no longer fits the bill, you're looking at quite possibly massive refactoring to switch over to click

Typer hits that sweet spot in the middle. It's super easy to work with for simple CLIs, Scales up super well, is capable of doing almost everything Click can do (it's built on click) and it's so much easier to use the Click

And the best part is, you use the exact same design pattern for simple CLIs as you do for complex CLIs, so it's really simple and straightforward to scale up as your project grows in complexity

2

u/ChemEngandTripHop Dec 22 '20

Thanks that was really informative. I'm just reaching the stage where I'm having to wrangle Fire for my more complex use-cases, will give Typer a shot!