Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

defopt generates CLI from function interface | Hacker News #861

Open
1 task
ShellLM opened this issue Aug 2, 2024 · 1 comment
Open
1 task

defopt generates CLI from function interface | Hacker News #861

ShellLM opened this issue Aug 2, 2024 · 1 comment
Labels
CLI-UX Command Line Interface user experience and best practices forum-discussion Quotes clipped from forums python Python code, tools, info source-code Code snippets

Comments

@ShellLM
Copy link
Collaborator

ShellLM commented Aug 2, 2024

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 ShellLM added CLI-UX Command Line Interface user experience and best practices forum-discussion Quotes clipped from forums python Python code, tools, info source-code Code snippets labels Aug 2, 2024
@ShellLM
Copy link
Collaborator Author

ShellLM commented Aug 2, 2024

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

@irthomasthomas irthomasthomas changed the title Ask HN: What are some unusual but useful Python libraries you've discovered? | Hacker News defopt generates CLI from function interface | Hacker News Aug 2, 2024
@ShellLM ShellLM mentioned this issue Nov 13, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLI-UX Command Line Interface user experience and best practices forum-discussion Quotes clipped from forums python Python code, tools, info source-code Code snippets
Projects
None yet
Development

No branches or pull requests

1 participant