3 ms·
All due respect but Typer looks like the kind of library that you want to use after your CLI has enough args that you wouldn't be able to get away with the sort
by Daishiman 1y ago
All due respect but Typer looks like the kind of library that you want to use after your CLI has enough args that you wouldn't be able to get away with the sort of "Hello World" simplicity that you pine for.
Nobody's stopping you from manually parsing a couple of arguments. I still do it all the time and it's OK. If anything the magic of gradual typing is that you get to use it as necessity arises.
- maleldil 1y agoTyper is very convenient. I don't believe anyone manually parses arguments manually in Python where we have argparse in the standard library, and Typer is a step forward from that.
- Gethsemane 1y agoI really want to like typer, and frequently go down the rabbit hole of rewriting all my argparse into typer, but I keep getting put off by it's high import cost and that development seems to be a bit up in the air (see https://github.com/fastapi/typer/issues/678#issuecomment-3191908435 https://github.com/fastapi/typer/issues/678#issuecomment-319...). A shame because otherwise it's a really nice library!
- benrutter 1y agoI think your completely fair in pointing out that only a deeply troubled person would write this up as a generic version of "hello world", it's a silly example and I was at least partly going OTT for comic effect. That said, I think it's true that production python tends to look more like my example, and less `print("hello world")`.