3 ms·
These days i use typer (https://typer.tiangolo.com/ https://typer.tiangolo.com/), but docopt remains a fan favorite of mine for being just so darn cute. it's a
by hprotagonist 5y ago
These days i use typer (https://typer.tiangolo.com/ https://typer.tiangolo.com/), but docopt remains a fan favorite of mine for being just so darn cute.
it's a shame that the last i checked, there wasn't really a formal grammar for it and so doing a lot of the modern conveniences i like[0] is either hard or impossible, but the idea's still charming.
[0]: i want things like "ensure this is a path and it's a file and it exists and it's nonzero size and give it back to me as a `pathlib.Path` please" or "this argument must be an integer between 10 and 5002", etc.