Ask HN: What are some unusual but useful Python libraries you've discovered?
Snippet
defopt generates CLI from function interface: https://defopt.readthedocs.io/en/stable/features.html
The alternative is either you maintain two interfaces with boilerplate, or write a CLI only if that's the first priority.
Similar solutions exist, like fire. But fire's CLI is like an afterthought, in the sense it gives people a way to run things in command line where they already know how to run it from Python.
Ask HN: What are some unusual but useful Python libraries you've discovered?
Snippet
defopt
generates CLI from function interface: https://defopt.readthedocs.io/en/stable/features.html The alternative is either you maintain two interfaces with boilerplate, or write a CLI only if that's the first priority. Similar solutions exist, likefire
. Butfire
's CLI is like an afterthought, in the sense it gives people a way to run things in command line where they already know how to run it from Python.Full Content
URL: https://news.ycombinator.com/item?id=41116896
Suggested labels
None