irthomasthomas / undecidability

13 stars 2 forks source link

defopt generates CLI from function interface | Hacker News #861

Open ShellLM opened 4 months ago

ShellLM commented 4 months ago

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.

Full Content

URL: https://news.ycombinator.com/item?id=41116896

Suggested labels

None

ShellLM commented 4 months ago

Related content

860 similarity score: 0.88

808 similarity score: 0.86

743 similarity score: 0.85

734 similarity score: 0.84

762 similarity score: 0.84

746 similarity score: 0.84