162 points · by tosh · 2y ago · 29 comments
It’s the best one for Python in my opinion. Pretty easy to work with.
There also a tmux and vim clone that uses prompt_toolkit iirc.
My usecase involves embedding a text editor widget inside my TUI app with vim keybindings enabled, and I don't think that Textual yet has a way to do that. But on the other hand it looks like Textual has a way bigger library of pre-built widgets for full-screen applications.
prompt_toolkit started as a tool for REPLs and eventually grew a basic full-screen application mode, so there's excellent support for text editing and the widget stuff is a lot less mature. It looks like Textual started as a tool for full-screen apps and has a great widget library but the text-editing widget is much less mature.
My application started as a CLI and I gradually added TUI elements around the command bar, and prompt_toolkit is definitely the best for something like that. I think that if your plan is something more similar to a webapp and you want to rely on a component library then Textual would probably be better.
This is the classic trade-off between convention and configuration.
You can prefer a tech stack that values convention over configuration, while others prefer the opposite.
This is totally fine.
with no choice comes responsibility too, it's just that neither are yours, and likely aren't what you'd want.
edit: at this time, incidentally, i'm choosing to not use the VC-backed out-of-ecosystem toolchain (ruff, uv); pipx and setuptools do just fine.
I should check out pgcli too when I use Postgres in the future.