HN2new | past | comments | ask | show | jobs | submitlogin

I read this entire thread thinking - this is neat and all but it’s a handful of lines of almost english language in a .py file.

Click is a neat upgrade from argparse if you’re ever tempted (assuming something like “pip install —-user” is viable in your situation which isn’t true for everyone).

I’ve seen, but haven’t used https://typer.tiangolo.com/ - i have used his FastAPI and thought that was nicely done (even if python async is a bit annoying to test).

Talking of python cli libs I haven’t tried but will do one day - rich: https://github.com/willmcgugan/rich



Well, but then you'd be writing python. (and having to maintain python runtime environment, which tends to be much less stable than CL)


I try to avoid pip and dependencies for these python scripts. This goal has it's limits.

Click is nice if you want a command with multiple sub commands. I use Go + Cobra at that point via https://github.com/hofstadter-io/hofmod-cli

The human understanding is a big reason why python has gained my favor over bash




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: