--- id: telnetlib3 version: "5.0.0" license: ISC license_treatment: permissive maintenance: active --- # telnetlib3 — Python Telnet server and client CLI and Protocol library License: permissive · Maintenance: active · Downloads: 1.7M/mo ## What it is and what it does Telnetlib3 is a feature-rich Telnet implementation that provides both asyncio-based and synchronous blocking APIs for building telnet servers and clients. It implements RFC specifications for telnet protocol negotiation, including support for binary transmission, character encoding negotiation, compression (MCCP2/MCCP3), terminal type detection, and window size reporting. The library includes command-line utilities (telnetlib3-client, telnetlib3-server) for quick telnet connections and hosting, plus fingerprinting tools. For Python 3.13+, it provides a drop-in shim for the removed standard telnetlib module, allowing existing code to continue working unchanged. The package is designed for developers building MUD (Multi-User Dungeon) and BBS (Bulletin Board System) servers, retro computing applications, and other telnet-based systems. It handles encoding negotiation automatically when possible, supports raw mode for non-compliant servers, and can host external programs via pseudo-terminal (PTY) execution. Dependencies are minimal (blessed for terminal handling, wcwidth for character width calculation), and the codebase is actively maintained with broad Python version support. Use it for: - Build a telnet server for a MUD or interactive game with custom shell logic and protocol negotiation - Connect to legacy BBS systems or telnet servers with automatic or manual encoding handling (cp437, big5bbs, ATASCII) - Host a CLI/TUI program (e.g., bash, bc) as a telnet service with optional linemode or raw mode - Migrate Python 3.13+ code that relied on the standard telnetlib module by installing telnetlib3 as a drop-in replacement - Implement telnet client automation scripts that negotiate compression and terminal capabilities with remote servers - Fingerprint telnet servers to detect their capabilities and protocol support ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Telnet server, client, and protocol library for Python 3.9+ with asyncio and blocking API support, including CLI utilities and a backport of the removed telnetlib module for Python 3.13+. Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It fills a genuine gap left by the removal of telnetlib in Python 3.13 and provides a modern, well-specified implementation for telnet server/client work. Install it if you need telnet support, are migrating from the standard library, or are building MUD/BBS infrastructure. ## Install pip install telnetlib3 uv add telnetlib3 poetry add telnetlib3 ## Installing telnetlib3 Before you install: Low friction: pure Python wheel with only two runtime dependencies (blessed, wcwidth). Actively maintained with a release 7 days ago. Supports Python 3.9 through 3.14. License in practice: ISC license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects. Quickstart: import asyncio import telnetlib3 async def shell(reader, writer): writer.write('Hello\r\n') await writer.drain() writer.close() async def main(): server = await telnetlib3.create_server(port=6023, shell=shell) await server.wait_closed() asyncio.run(main()) Requires Python 3.9 or newer; asyncio event loop required for async API. Verify before relying: - Whether the blocking API is feature-complete relative to the asyncio interface - Performance characteristics under high concurrency or large message volumes - Compatibility with non-standard telnet implementations beyond the RFC specifications listed ## Package facts - License: ISC (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.7M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags telnet server client library, asyncio telnet protocol, telnet CLI utilities, python telnet implementation, MUD BBS telnet support, telnet with compression MCCP, telnet character encoding negotiation, telnet-protocol, asyncio-ready, retro-computing [View on SkillFed](https://skillfed.io/packages/telnetlib3) · [View on PyPI](https://pypi.org/project/telnetlib3/)