12 comments

  • simonw 1015 days ago
    I've been watching this evolve following Will on Twitter over the last few months - it's really exciting. I love how he's posting progress videos to the README too.

    The underlying library Rich is some of the best API design I've seen in ages, so I have very high expectations of Textual which it looks like it's easily going to meet.

    • willm 1015 days ago
      Cheers, Simon!
    • tmearnest 1014 days ago
      What about the API design is so awesome?
      • simonw 1014 days ago
        Mainly it's the absurd amount of functionality that's packed into the library, in a way that interoperates in a predictable way.

        Rich does a LOT of stuff, and all of the things it does work with each other - so it's easy to compose them together into sophisticated combined layouts.

        It can render Markdown in a way that works on a console. It has gorgeous progress bars and spinners built in. It has a very competent table layout mechanism.

        https://github.com/willmcgugan/rich/tree/master/examples is full of neat examples of what it can do - all very Pythonic in the way they work.

  • nneonneo 1015 days ago
    This looks beautiful. I've already started using Rich in the REPL - it's definitely a nice little upgrade to get. The developer is very responsive and the project looks amazing.
  • minimaxir 1015 days ago
    Show HN for the base Rich renderer a year ago: https://news.ycombinator.com/item?id=23070821

    It's an impressive piece of software with a few surprises. (such as rendering to HTML)

  • tbabej 1015 days ago
    It's great to see some more competitors on the TUI front of the Python ecosystem! I recently tried multiple existing frameworks and was not particularly happy with the state.

    Here are the main contenders for libraries that provide higher-level API than urwid/ncurses:

    * Picotui, https://github.com/pfalcon/picotui

    * Npyscreen, https://github.com/npcole/npyscreen

    * py_cui, https://github.com/jwlodek/py_cui

    Both Picotui and Npyscreen are relatively unmaintained / considered feature-full. py_cui seems to be in the best shape.

    Fingers crossed for this project making it through, building on top of Rich gives it quite a bit of headstart. You can also sponsor @willmcgugan on Github [0].

    [0]: https://github.com/sponsors/willmcgugan

    • BeFlatXIII 1015 days ago
      Have you tried ASCIImatics? https://github.com/peterbrittain/asciimatics

      A project I’m considering would have something similar to the Django admin interface but a TUI with keyboard shortcuts like shift+F9 and I’d like a “pick one and stick with it” recommendation for a TUI toolkit. That said, if a TUI front end for Django admin tasks already exists and I’ve missed it, I’d love to just use that rather than starting from scratch.

      • tbabej 1015 days ago
        I did look into it, but its focus on animations gave me the perhaps unfair impression that the more mundane text UI elements (i.e. forms, etc.) would be a second-class citizen.

        Looked like a really great library to build a text adventure game with though!

  • IncRnd 1015 days ago
    This looks great. If testing it works out, then using it will be very helpful for me. Thank you!
  • mattbuilds 1015 days ago
    I'm a huge fan of Rich. Can't wait to add Textual to the toolbox.
  • w0m 1015 days ago
    My goal is to rewrite all our internal flask apps in this (or something similar)
  • edward 1015 days ago
  • salmo 1015 days ago
    I haven't done a TUI since using curses, which is appropriately named.

    I do have some scripts used by non-developers, who can do things on the command line, but only by wrote. This would be really great for that vs having to build out a web-based thing.

    This looks like DOS-based UIs, but so much nicer. I just never even considered that a possibility.

    It looks like it's aiming for a very usable API, I'll try to follow its progress.

  • sidlls 1015 days ago
    Reminds me of old DOS-based C++ editors I used way back in undergrad. Borland C++ being one of these. Except smoother/nicer looking.
  • nexuist 1015 days ago
    I took a brief glance at the syntax. Am I correct in thinking this is SwiftUI-like?
    • ipsum2 1015 days ago
      SwiftUI, Jetpack Compose, Flutter are all very similar UI frameworks, based off of the declarative UI that React popularized.
    • dlivingston 1015 days ago
      SwiftUI is pretty clearly inspired by React, and as Will hinted in a sister comment, Rich is inspired by (I assume) React as well. So, I think the relationship is tangential rather than direct.
    • willm 1015 days ago
      It might be. But I've never used SwitftUI. I'm taking inspiration from web technologies and various GUI systems I've used.
      • nexuist 1015 days ago
        Ah, okay. As a sibling comment said SwiftUI was inspired by React so it makes sense that some concepts would transfer over. Thanks for the response!
  • js2sj 1015 days ago
    Hope there's an equivalant framework for nodejs!