Skip to main content

pupptyeer-client

Thin Python client for the pupptyeer daemon: NDJSON over a unix socket, standard library only (no dependencies).

pupptyeer is a local daemon that owns persistent PTY sessions. This client talks to it over the daemon's unix socket; it does not start the daemon. Install and run the daemon separately (see the main README), or npm i -g pupptyeer for the prebuilt binary.

Install

pip install pupptyeer-client

Requires Python >= 3.8.

Usage

import os, sys
from pupptyeer_client import PupptyeerClient

# Connect to the daemon's unix socket (the daemon exports its path via $PUPPTYEER_SOCK).
c = PupptyeerClient.connect(os.environ["PUPPTYEER_SOCK"])

# Spawn a command in a fresh PTY; get back a session id.
sid = c.new_session(command="bash", cols=80, rows=24)

# Stream the session's live output, then attach this connection.
c.on_output(sid, lambda b: sys.stdout.buffer.write(b))
c.attach(sid, cols=80, rows=24)

# Drive it.
c.write_pane(sid, "echo hello\n")

# Read the daemon's authoritative rendered screen once the PTY goes quiet.
screen = c.capture_screen(sid, settle_ms=50)
print("\n".join(screen.lines))

c.close()  # sessions outlive the client

See the protocol spec for the full verb set (new_session, list_sessions, attach/detach, write_pane, capture_pane, resize, kill, gc).

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pupptyeer_client-0.10.2.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pupptyeer_client-0.10.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file pupptyeer_client-0.10.2.tar.gz.

File metadata

  • Download URL: pupptyeer_client-0.10.2.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pupptyeer_client-0.10.2.tar.gz
Algorithm Hash digest
SHA256 359760e65f803620a9a49c549827b77d987c30b2b832b76f6bed7ae56e9875e1
MD5 3d28323b77d365697b257a94ac8b4d4a
BLAKE2b-256 9fe5d11acc2b68611ca4a8d7be79b0028cbc5d4ac0224d806da0c920e404b733

See more details on using hashes here.

Provenance

The following attestation bundles were made for pupptyeer_client-0.10.2.tar.gz:

Publisher: release.yml on PeterSR/pupptyeer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pupptyeer_client-0.10.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pupptyeer_client-0.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43d9e3e9c330fc55ef442f430e1577ae4879b847f8a6b59604d3c7c3d34a7629
MD5 9df7c519cb84518a25ca94d8f8aaa9c6
BLAKE2b-256 19bfeb886371fdef46b0169bb52fdaf6e94c86893702a5d2b4105fe21a20a347

See more details on using hashes here.

Provenance

The following attestation bundles were made for pupptyeer_client-0.10.2-py3-none-any.whl:

Publisher: release.yml on PeterSR/pupptyeer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.10.2 This release

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.1

2 files

0.5.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page