Urwid is a Python library for creating rich, interactive text-based user interfaces (TUIs) in the terminal. It supports widgets, colors, mouse interaction, and even complex layouts — making it ideal for building terminal dashboards, text editors, or configuration tools. Urwid helps you create visually appealing and responsive interfaces entirely within the command line.
Installation:
pip install urwid
Example usage:
import urwid
def on_exit(button):
raise urwid.ExitMainLoop()
text = urwid.Text("Hello, Urwid!")
button = urwid.Button("Exit")
urwid.connect_signal(button, 'click', on_exit)
pile = urwid.Pile([text, button])
fill = urwid.Filler(pile, valign='middle')
loop = urwid.MainLoop(fill)
loop.run()
PyPI page: https://pypi.org/project/urwid/
GitHub page: https://github.com/urwid/urwid
3 Project Ideas:
- Build a terminal-based chat or messaging client.
- Create a text-based system monitoring dashboard.
- Develop an interactive CLI menu system for server management.
Top comments (0)
Some comments may only be visible to logged-in visitors. Sign in to view all comments.