Registry / devops / ansi
library0.3.7pypypi✓ verified 84d ago

A lightweight Python library for producing ANSI terminal control sequences, including cursor movement, color (8-bit and 24-bit True Color), and graphics. Current stable version is 0.3.7, released in October 2023. Maintenance mode; infrequent releases.

pip install ansi
INSTALL
IMPORT
SIG · ANSI
A
ansi
devopspythonv0.3.7
Install
1.6s avg
Import
—
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.3.7 · 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.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

color
✓ from ansi import color
✗ from ansi import Cursor
cursor
✓ from ansi import cursor
colour
✓ from ansi import colour

Move cursor up one line and print red text, then reset color.

from ansi import Cursor, Fore, EscapeCode cursor = Cursor() print(cursor.up(1) + Fore.RED + 'Hello in red' + Fore.RESET)
Debug
Known issues
deprecatedPython 2 and Python <3.7 are no longer supported. The rgb() function only accepts integers, not strings.
fix
Ensure Python >=3.7; pass integers to rgb(), e.g., rgb(255,0,0) not rgb('255','0','0')
affects: >=0.3.1
gotchaThe package does not automatically reset terminal attributes; you must explicitly use RESET codes.
fix
Add Fore.RESET or Cursor.RESET after your output, or use context managers if available.
affects: all
Upgrade
Version history
0.3.7latest on PyPI · released Jan 22, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
30
OpenAI (training)
1
Resources
ansi — pip install ansi · libregistry