kittytgp
kittytgp is a small pure-Python package that renders a PNG with kitty's graphics protocol using Unicode placeholders (U+10EEEE).
It follows kitty's tmux/editor-friendly placeholder flow:
- transmit PNG data with kitty graphics protocol
- create a virtual placement with
U=1 - print
U+10EEEEplaceholder text colored with the image ID
Because the visible part is ordinary Unicode text, the image moves with the text buffer and works inside hosts such as tmux.
Install
pip install kittytgp
CLI
kittytgp plot.png
Useful options:
kittytgp plot.png --cols 40
kittytgp plot.png --rows 20
kittytgp plot.png --cell-size 10x20
kittytgp plot.png --image-id 0x123456
kittytgp plot.png --no-newline
Python API
from kittytgp import render_png
render_png("plot.png")
Or build the bytes yourself:
from kittytgp import build_render_bytes
payload = build_render_bytes("plot.png")
Design notes
This package intentionally stays small:
- PNG input only
- direct transfer (
f=100PNG payload in APC chunks) - Unicode placeholders only
- 24-bit image IDs encoded in truecolor foreground color
- tmux passthrough only when needed
By default it fits the image into the current terminal while preserving aspect ratio. If the terminal cannot report cell pixel size, pass --cell-size, --cols, or --rows.
Release files for kittytgp 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kittytgp-0.0.2.tar.gz | 15.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kittytgp-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.0 kB
Release files / kittytgp-0.0.2.tar.gz
| Download URL | kittytgp-0.0.2.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
295f9cd4ae9c9a701106860e370037a117c8cb8839f1d639badbba5d4dde5838
|
|
BLAKE2b-256 checksum How to use checksums |
ea1d99145a25f1998b1c58ca8734d198868667d7d4d1c5b5079549b4da668285
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / kittytgp-0.0.2-py3-none-any.whl
| Download URL | kittytgp-0.0.2-py3-none-any.whl |
|---|---|
| Size | 14.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0121a57446079f405824c3604beaa88583dbecd031953cbb755db2fb6d0525cf
|
|
BLAKE2b-256 checksum How to use checksums |
035415d79ee63b06dc811ba4155e0a114cfc1573aecd670272ff215c8d80a68f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|