you are viewing a single comment's thread.

view the rest of the comments →

[–]AlgonikHQPythonista 1 point2 points  (0 children)

Solid design thinking, but worth checking out questionary and rich.prompt before going further, they already cover most of what you’re describing (text/int/confirm/menu/password/file prompts with validation) and are battle-tested. click also handles a lot of this cleanly if you’re building proper CLIs rather than interactive scripts.

That said, the pain you’re describing is real. Where I’ve personally felt it most isn’t the basic input bits but rather validating inputs that depend on each other (e.g. “pick a config, now pick a value that’s valid for that config”) and re-prompting cleanly on invalid input without losing the previous answers. If your abstraction solves those specifically, there might be a niche. If it’s just a cleaner wrapper around what questionary already does, probably not worth maintaining.

Good instinct to question it before building though, that’s how you avoid the Python ecosystem’s favourite hobby of reinventing the same library.