teleprint
Print a growing transcript to the terminal's own scrollback. A block is a string with a key: update a streamed reply by using its key again. Visible rows change in place; rows that already scrolled away stay as printed.
Inside a Tokio runtime, write each frame to the same terminal, starting at column zero:
use teleprint::{Transcript, tty::Tty};
let mut tty = Tty::open()?;
let (cols, rows) = tty.size()?;
let mut view = Transcript::new(cols, rows);
tty.write(&view.put("request", "How many?"))?;
tty.write(&view.put("reply", "Working…"))?;
tty.write(&view.put("reply", "42"))?;
tty.write(&view.finish())?;
Use sync to replace the ordered blocks together and show an editable draft below them. Pass a UTF-8 byte offset into the draft to place the cursor. The caller handles input; Tty.events supplies key, paste and resize events.
tty.mouse(true) also requests clicks and wheel events. Use view.hit(clicked_row - cursor_row) with a signed row difference to get the block key or wrapped tail row under a click.
let blocks = [("request", "How many?"), ("reply", "42")];
let draft = "> next";
tty.write(&view.sync(&blocks, draft, Some(draft.len())))?;
For a table or other width-dependent layout, pass (key, source, display) triples to sync_projected_at(cols, rows, blocks, draft, cursor). Use the same source across resizes. resize(cols, rows) reflows plain text. finish() removes the draft and leaves the cursor below the transcript.
SGR colors and emphasis survive; input cannot move the cursor or issue terminal commands. Use plain(text) for a pipe or file. For a Kitty-capable terminal, kitty::Image::decode(base64) reads a PNG or JPEG. Its render(id, max_cols, tmux) returns the protocol transmission to write first and a placeholder grid for a transcript block. Images sent on the primary screen must be sent again for alternate-screen placement; tmux requires allow-passthrough on.
Python
Install with pip install teleprint. The Python Transcript class calls the same Rust implementation:
import os, sys
from teleprint import Transcript
t = Transcript(*os.get_terminal_size())
for frame in (t.put('reply', 'Working…'), t.put('reply', '42'), t.finish()):
sys.stdout.write(frame)
sys.stdout.flush()
See DEV.md for the package layout and tests.
Metadata
Release files for teleprint 0.1.11
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 |
|---|---|---|---|---|
| teleprint-0.1.11.tar.gz | 26.3 kB | With provenance | Details for teleprint-0.1.11.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| teleprint-0.1.11-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for teleprint-0.1.11-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| teleprint-0.1.11-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details for teleprint-0.1.11-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| teleprint-0.1.11-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for teleprint-0.1.11-cp310-abi3-macosx_11_0_arm64.whl |
Total release size: 1.8 MB
Release files / teleprint-0.1.11.tar.gz
| Download URL | teleprint-0.1.11.tar.gz |
|---|---|
| Size | 26.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb802a5a764db708aa7e703ffb55685db87a57ea6c48c2a56e895ec4076a6fe4
|
|
BLAKE2b-256 checksum How to use checksums |
d13fe847fd116b83f6b3048c3f4ec4fb1d9bc8c9af7a3180b68d575dc639ac4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / teleprint-0.1.11-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | teleprint-0.1.11-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 587.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
43e902a568911115ed0ecb60e7ff90438bc439fb545f90236b3fa29470bdf199
|
|
BLAKE2b-256 checksum How to use checksums |
ff6b6d2e33375744195a05f879f6d9fb60744efa04225bda7ce0249405d57eec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / teleprint-0.1.11-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | teleprint-0.1.11-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 576.0 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4e4891fcfa026151f8c5d3a7b2981e37fb48fc628dc30a15f4ce570479bf743c
|
|
BLAKE2b-256 checksum How to use checksums |
7337224e04841dc6de266deebe72ec43bf90aafcd02c51b4d21a2b0ee84d9c53
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / teleprint-0.1.11-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | teleprint-0.1.11-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 579.5 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a760b851bf27ef6dfdddc64dfe7f8efb179df221df5c2cebf43ee81c58bbb809
|
|
BLAKE2b-256 checksum How to use checksums |
61fb03a9b2c75c3f9b3497022e8ed1ff6cad01ca6c52aca8f38b92719624d962
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for teleprint 0.1.11
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.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for teleprint-0.1.11.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA 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.