Comment

Comment by shangxiao

I don't have a startup but I did make a useful little Python library while at my previous job to help ease the pain with using argparse to make CLIs.

It's called bargeparse [1]. The idea is to define an entry point function and use its signature as a means to declare the CLI arguments & options. I was surprised at how well Python's syntax for function arguments works for this... especially the use of pos-only & keyword-only arguments to force a particular style.

[1] https://github.com/shangxiao/bargeparse

parent shangxiao 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton