Urwid is a console user interface library for Python on Linux, OSX, Cygwin or other unix-like OS and partially supports Windows OS (see below).
It includes many features useful for text console application developers including:
- Applications resize quickly and smoothly
- Automatic, programmable text alignment and wrapping
- Simple markup for setting text attributes within blocks of text
- Powerful list box with programmable content for scrolling all widget types
- Your choice of event loops: Twisted, Glib (deprecated), Tornado, asyncio, trio, ZeroMQ or select-based loop
- Pre-built widgets include edit boxes, buttons, check boxes and radio buttons
- Display modules include raw, curses, and experimental LCD and web displays
- Support for UTF-8, simple 8-bit and CJK encodings
- 24-bit (true color), 256 color, and 88 color mode support
- Compatible with Python 3.11+ and PyPy
- Home Page:
- http://urwid.org/
To install using pip
pip install urwidFor advanced functionality extra requirements need to be installed. Example for ZeroMQ event loop and LCD display:
pip install urwid[serial,zmq]Alternatively if you are on Debian or Ubuntu
apt-get install python3-urwidWindows support is limited to the Windows 10+ due to ANSI support requirement.
- Not supported:
- Terminal widget and all related render API (TermCanvas, TermCharset, TermModes, TermScroller)
- Any file descriptors except sockets (Windows OS limitation)
- ZMQEventLoop.
- Special requirements:
- Extra libraries required for curses display support:
pip install urwid[curses]- CursesDisplay incorrectly handles mouse input in case of fast actions.
- Only UTF-8 mode is supported.
To run tests locally, install & run tox. You must have appropriate Python versions installed to run tox for each of them.
To test code in all Python versions:
tox # Test all versions specified in tox.ini
tox -e py311 # Test Python 3.11 only
tox -e py313t # Test Python 3.13 with free-threading
tox -e pypy3 # Test PyPy3
tox -e py311,py312,pypy3 # Test specific versionsCPython standard (default)
Tests all optional extras including C extensions (glib, zmq, twisted).
tox -e py313Free-threaded CPython (3.13+)
Tests with compatible extras (tornado, trio, twisted, serial). Excludes C extensions without free-threading wheel support.
tox -e py313t # Python 3.13 free-threaded (PEP 703)
tox -e py314t # Python 3.14 free-threaded
tox -e py315t # Python 3.15 free-threadedPyPy3
Tests with compatible extras (tornado, trio, serial). Excludes problematic C extensions.
tox -e pypy3GraalPy
Tests with compatible extras (tornado, serial). Excludes extras that need C extensions GraalPy
doesn't support (glib, zmq) or that have known compatibility issues (trio, twisted). GraalPy also
ships no _curses module, so curses-dependent tests are expected to fail, and the Terminal
widget (urwid.vterm) is unsupported since its fcntl/pty usage doesn't work on GraalPy,
so its tests are skipped rather than run.
tox -e graalpy311 # GraalPy 3.11
tox -e graalpy312 # GraalPy 3.12Urwid supports:
- CPython 3.11, 3.12, 3.13, 3.14, 3.15
- CPython 3.13+ with free-threading (PEP 703
--disable-gil) - PyPy 3.11
- GraalPy 3.11, 3.12 (experimental)
CPython (standard Python)
Full support for all optional features. All extras (curses, glib, serial, tornado, trio, twisted, zmq) can be installed.
On Windows, the curses extra cannot be installed on Python 3.15 yet: windows-curses publishes no 3.15 wheel.
CPython with Free-Threading (3.13, 3.14, 3.15+)
Urwid core and pure-Python event loops are fully supported. Some extras require C extensions that may not have free-threading wheels available:
- ✅ Supported: core, tornado, trio, twisted, serial, lcd
- ❌ Unsupported: glib, zmq (require C extensions with free-threading wheel support)
For free-threading Python, install with compatible extras:
python3.13 -m pip install 'urwid[tornado,trio,serial]'PyPy
Urwid core is fully supported. Some extras may have compatibility issues:
- ✅ Supported: core, tornado, trio, serial, lcd
⚠️ Limited: twisted (may have issues, test before using)- ❌ Unsupported: glib, zmq (C extensions with limited PyPy support)
- ❌ Unsupported: curses on Windows (PyPy for Windows ships no
_cursesmodule andwindows-cursespublishes no PyPy wheels)
GraalPy (experimental)
Urwid core and the select/asyncio event loops are supported. Some extras, display
modules, and the Terminal widget are not:
- ✅ Supported: core, tornado, serial, lcd
- ❌ Unsupported: curses (GraalPy ships no
_cursesmodule), glib, zmq, twisted, trio (no C extension support, or known compatibility issues), Terminal widget/urwid.vterm(like on Windows,fcntl/ptyusage doesn't work on GraalPy)
and3rson, tonycpsu, ulidtko, penguinolog
1in7billion, abadger, agrenott, akorb, alethiophile, aleufroy, alobbs, amjltc295, and-semakin, andrewshadura, andy-z, anttin2020, Apteryks, Arfrever, AutoAwesome, belak, berney, bk2204, BkPHcgQL3V, bwesterb, carlos-jenkins, Certseeds, Chipsterjulien, chrisspen, cltrudeau, Codeberg-AsGithubAlternative-buhtz, cortesi, d0c-s4vage, derdon, dholth, dimays, dlo, dnaeon, doddo, douglas-larocca, drestebon, dsotr, dwf, EdwardBetts, elenril, EnricoBilla, extempore, fabiand, floppym, flowblok, fmoreau, goncalopp, Gordin, GregIngelmo, grzaks, gurupras, HarveyHunt, Hoolean, hukka, hydratim, ids1024, imrek, isovector, itaisod, ixxra, jeblair, johndeaton, jonblack, jspricke, kedder, Kelketek, KennethNielsen, kesipyc, kkrolczyk, Kwpolska, Lahorde, laike9m, larsks, lfam, lgbaldoni, lighth7015, livibetter, Lothiraldan, Mad-ness, madebr, magniff, marlox-ouda, mattymo, mdtrooper, mgk, mimi1vx, mobyte0, MonAaraj, MonthlyPython, mountainstorm, mselee, mwhudson, naquad, nchavez324, neumond, nolash, ntamas, nyov, ocarneiro, okayzed, pquentin, rbanffy, ReddyKilowatt, regebro, renegarcia, rianhunter, roburban, RRMoelker, rwarren, scopatz, seanhussey, seonon, shadedKE, sithglan, Sjc1000, sporkexec, squrky, ssbr, techdragon, thehunmonkgroup, thisch, thornycrackers, TomasTomecek, tompickering, tony, ttanner, tu500, uSpike, vega0, vit1251, waveform80, Wesmania, xandfury, xndcn, zhongshangwu, zrax