--- id: dockerpty version: "0.4.1" license: Apache 2.0 license_treatment: permissive maintenance: abandoned --- # dockerpty — Python library to use the pseudo-tty of a docker container License: permissive · Maintenance: abandoned · Downloads: 706.8K/mo ## What it is and what it does dockerpty is a Python library that bridges the gap between a host terminal and a Docker container's pseudo-terminal (PTY), allowing you to run interactive shell sessions inside containers as if you were directly connected to them. It handles the low-level details of terminal control: piping stdin/stdout/stderr between host and container, managing raw terminal mode, handling window resize signals, and restoring terminal state on exit. The library is designed for scenarios where you need programmatic, interactive access to a container's shell from Python. It also supports non-TTY attachment for streaming container output. However, the project is abandoned (last release 2016-02-04, no commits since 2019-10-16) and does not explicitly declare its runtime dependency, creating friction for new installations and raising questions about compatibility with modern tooling. Use it for: - Run interactive shell sessions inside Docker containers from Python scripts, giving users direct terminal control. - Implement programmatic container debugging or administration tools that need real-time terminal interaction. - Stream container output in non-TTY mode when interactive control is not required. - Detach from and re-attach to running containers without stopping them. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Operates the pseudo-terminal (PTY) allocated to a Docker container, enabling interactive terminal control of containerized processes from Python. No. The package is abandoned (last release 2016-02-04, no commits since 2019-10-16) and does not explicitly declare its runtime dependency, creating installation friction and compatibility risk. Modern Docker tooling has evolved significantly since then. Consider using maintained alternatives or the official Docker SDK for interactive container control. ## Install pip install dockerpty uv add dockerpty poetry add dockerpty ## Installing dockerpty Before you install: High install friction: the package does not explicitly declare its runtime dependency in PyPI, requiring manual installation. Maintenance is abandoned—last release was 2016-02-04, with no commits since 2019-10-16. License in practice: Licensed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions, though you should review the LICENSE.txt file for exact terms. Quickstart: pip install dockerpty import dockerpty dockerpty.start(client, container) Requires an undeclared external dependency (docker-py >=0.3.2); only works when run in an actual terminal; requires Docker daemon running locally. Verify before relying: - Compatibility with modern Docker SDK versions—last release predates major Docker API changes. - Python version support—requires_python is unspecified; may not work on modern Python versions. - Whether the undeclared dependency is still the correct package name or has been superseded. - Current usability with contemporary Docker tooling and container runtimes. ## Package facts - License: Apache 2.0 (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 706.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags docker container terminal control, docker pty pseudo-terminal, interactive docker shell python, docker tty attachment, container stdin stdout stderr, docker terminal emulation, docker interactive mode python, docker-integration, terminal-control, abandoned [View on SkillFed](https://skillfed.io/packages/dockerpty) · [View on PyPI](https://pypi.org/project/dockerpty/)