Registry / http-networking / blessed

blessed

JSON →
library1.48.0pypypi✓ verified 25d ago

Blessed is an easy, practical Python library for making terminal applications, offering an elegant interface to handle colors, keyboard input, and screen positioning. It is currently at version 1.38.0 and maintains an active development and release cadence, with frequent updates improving compatibility and adding features.

pip install blessed
INSTALL
IMPORT
SIG · BLESSED
B
blessed
http-networkingpythonv1.48.0
Install
2.0s avg
Import
517ms
Disk
22MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.48.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.552s · 26.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.0s · import 0.482s · 27MB
22MB installed
● package 22MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Terminal
from blessed import Terminal
The `Terminal` class is the primary entry point for all Blessed functionality.

This example initializes the terminal, clears the screen, centers a styled message, waits for a single key press using a context manager for `cbreak` mode and a hidden cursor, then prints the pressed key before exiting. The `timeout` for `inkey` uses an environment variable fallback for robustness.

from blessed import Terminal import os term = Terminal() print(term.home + term.clear + term.move_y(term.height // 2)) print(term.black_on_darkkhaki(term.center('press any key to continue.'))) with term.cbreak(), term.hidden_cursor(): # Use os.environ.get for auth keys in real applications if needed inp = term.inkey(timeout=os.environ.get('BLESSED_INKEY_TIMEOUT', 3)) print(term.move_down(2) + 'You pressed ' + term.bold(repr(inp))) print(term.normal + 'Exiting.')
Debug
Known issues
breakingPython 3.7 and earlier versions are no longer supported since Blessed version 1.28. Attempting to use Blessed 1.28+ with Python 3.7 or older will result in an ImportError.
fix
Upgrade your Python environment to 3.8 or newer. For projects requiring older Python versions, use Blessed < 1.28.
affects: >=1.28
deprecatedThe `Terminal.move()` method is deprecated in favor of `Terminal.move_xy(x, y)`. Also, compoundable attributes like `superscript`, `subscript`, `shadow`, and `dim` with colors (e.g., `term.blue_subscript('a')`) are deprecated as they are rarely supported by terminals.
fix
Use `term.move_xy(x, y)` for explicit cursor positioning. For text styles like subscript/superscript, consider using Unicode characters or 256/24-bit color codes directly if supported by the terminal, rather than relying on deprecated compound attributes.
affects: >=1.33
gotchaThe `Terminal.location()` context manager cannot be nested. Entering a new `location` context while another is active may lead to unexpected cursor behavior.
fix
Ensure that `with term.location(...)` blocks are not nested. Complete one `location` context before entering another.
affects: All versions
gotchaBlessed automatically omits terminal styling sequences if output is redirected to a non-terminal (e.g., a file or pipe). This is a feature, but can be a gotcha if styling is expected in piped output.
fix
If you explicitly require styling even when output is redirected, initialize the `Terminal` with `force_styling=True`, e.g., `term = Terminal(force_styling=True)`.
affects: All versions
gotchaEarlier versions of Blessed had less robust Windows support, particularly concerning `async_inkey()`, mouse events, and resize notifications. `async_inkey()` raised `NotImplementedError` on Windows prior to 1.33, and general performance for keyboard input was much slower.
fix
For optimal Windows compatibility and performance, ensure you are using Blessed version 1.34 or newer. These versions include significant improvements for console responsiveness and feature support on Windows.
affects: <1.34
gotchaFixes for Kitty keyboard protocol (correct key identification for CSI, alphanumeric keys, etc.) were applied in versions 1.30 and 1.36. Users of Kitty terminal emulators on older Blessed versions might experience incorrect key detection.
fix
If using a Kitty terminal and experiencing issues with key input, upgrade Blessed to version 1.36 or higher to benefit from improved protocol detection and key name synthesis.
affects: <1.36
breakingBlessed relies on a correctly configured `curses` environment and a functional `terminfo` database. In minimal environments (e.g., Alpine Linux Docker images) or if the `TERM` variable is incorrectly set, `_curses.error: must call (at least) setupterm() first` may occur when performing terminal operations.
fix
Ensure that the `terminfo` database is available in your environment (e.g., by installing `ncurses-terminfo` or `ncurses-base` packages on Linux distributions, or their equivalents). Verify that the `TERM` environment variable is set to a supported terminal type (e.g., `xterm`, `screen`, `tmux-256color`).
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'blessed'
The 'blessed' package is not installed in the Python environment you are currently using, or there is a mismatch between how it was installed (e.g., using `pip`) and how the Python script is being executed (e.g., with a different Python interpreter).
fix
Ensure 'blessed' is installed for your active Python interpreter: `pip install blessed` or `python -m pip install blessed`.
AttributeError: 'ParameterizingString' object has no attribute 'blink'
The `blink` attribute was removed or changed in newer versions of the `blessed` library, or it might not be supported by your terminal, leading to an AttributeError when attempting to use it directly on a `Terminal` object's formatting strings.
fix
Use the `term.blink()` callable method or compound styling if your terminal supports blinking, and consult the current `blessed` documentation for the correct way to apply blinking, for example: `print(term.blink('Blinking Text'))`.
ImportError: Blessed needs Python 3.2.3 or greater for Python 3
You are attempting to use a version of `blessed` with a Python 3 interpreter that is older than the minimum required version (3.2.3), or the library's version check mechanism is misidentifying your Python version.
fix
Upgrade your Python 3 interpreter to version 3.2.3 or newer, or ensure you are running your script with an up-to-date Python 3 environment. If using a virtual environment, verify its Python version.
Upgrade
Version history
1.48.0latest on PyPI · released Aug 7, 2026
Audit
Dependencies
pythonrequiredRequired Python version.
wcwidthrequiredUsed for determining the printable width of unicode characters in the terminal, essential for correct layout and text wrapping.
jinxedoptionalProvides a curses-like interface for Windows, enabling Blessed's full functionality on that platform.
Agent activity
29 hits · last 30 days
node
26
OpenAI (training)
1
Resources
blessed — pip install blessed · libregistry