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")
An app that draws its own screen can size the image and place each part itself. png_size reads a PNG's size in pixels. fit_grid chooses the largest grid within a column budget that keeps the image's aspect ratio, and consults no terminal. render_parts returns the transmit bytes and the placeholder text separately:
from kittytgp import png_size, fit_grid, render_parts
w, h = png_size("plot.png")
cols, rows = fit_grid(w, h, max_cols=40)
transmit, placeholder = render_parts("plot.png", cols=cols, rows=rows)
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.
Metadata
Release files for kittytgp 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| kittytgp-0.0.3.tar.gz | 18.6 kB | Without provenance | Details for kittytgp-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| kittytgp-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for kittytgp-0.0.3-py3-none-any.whl |
Total release size: 35.2 kB
Release files / kittytgp-0.0.3.tar.gz
| Download URL | kittytgp-0.0.3.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2535930faca969f5dff078a9a3cd5b0cc1c2704491c0c0d39c21ab2decbe1a3a
|
|
BLAKE2b-256 checksum How to use checksums |
15bae5d691ee67e5142fbe921961aab4eb317264b45b1a1952315fc5b793d112
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Release files / kittytgp-0.0.3-py3-none-any.whl
| Download URL | kittytgp-0.0.3-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
906511c6f9b58eaf7bc8647904ad13b0a62d35e2adbddf0a05434c9c5469b867
|
|
BLAKE2b-256 checksum How to use checksums |
20edfd5d3b3362cc0479d3d3c1c2ee2fad6fb13b92aae130bd1100dd78386c2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|
Security for kittytgp 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.