$npx skillfedfor your agent

pexpect-serial

pexpect with pyserial

With conditionsPyPI TerminalsReleased Aug 2019105.1K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — pexpect_serial-0.1.0-py3-none-any.whl
v0.1.0 · released 2019-08-10 · 2 runtime deps: pexpect, pyserial

Yes, if you need pexpect-style pattern matching over serial and are comfortable with an unmaintained package. The code is simple and the dependencies are stable, so it is unlikely to break immediately. However, verify compatibility with your current pexpect and pyserial versions, and be prepared to fork or patch if issues arise. Not recommended for new projects requiring ongoing support.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • You must open and manage the serial.Serial connection yourself before passing it to SerialSpawn; the package does not handle port lifecycle.
  • Low install friction with only two runtime dependencies (pexpect and pyserial).
  • However, the package is abandoned—last commit was 2021-05-18 and no releases since 2019-08-10.

License · maintenance · safety

permissive license (permissive) — MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.

last release 2019-08-10 (2561 days) · last repo commit 2021-05-18 · 20 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 105,104 downloads/mo, #12,720 on PyPI

Verify before relying

import serial
from pexpect_serial import SerialSpawn

with serial.Serial('COM1', 115200, timeout=0) as ser:
    ss = SerialSpawn(ser)
    ss.sendline('start')
    ss.expect('done')
  • Whether pexpect and pyserial versions currently available are compatible with this 0.1.0 release.
  • Whether the package works reliably with modern Python versions (3.9+) despite being unmaintained since 2019.
Same gist for agents: .md · .json

What it is and what it does

pexpect-serial adapts the pexpect library—which automates interactive terminal sessions—to work with serial ports managed by pyserial. Instead of controlling a subprocess or SSH session, you pass an open serial.Serial connection and use the same expect/sendline pattern-matching API to interact with serial devices. This is useful for automating communication with embedded systems, microcontrollers, or any device connected via serial that responds to text commands.

The package is minimal and straightforward: you open the serial port yourself using pyserial, wrap it in SerialSpawn, then use pexpect's familiar send and expect methods to script the interaction. The responsibility for opening, closing, and configuring the serial connection remains with the caller.

Use it for

  • Automate testing of firmware or bootloader behavior on embedded devices over serial.
  • Script interactive setup or configuration sequences for serial-connected hardware.
  • Build regression tests for serial protocol implementations or device command responses.
  • Automate repetitive serial console interactions (e.g., device provisioning or diagnostics).

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need pexpect-style pattern matching over serial and are comfortable with an unmaintained package.

The code is simple and the dependencies are stable, so it is unlikely to break immediately. However, verify compatibility with your current pexpect and pyserial versions, and be prepared to fork or patch if issues arise. Not recommended for new projects requiring ongoing support.

Install

pexpect-serial on PyPI

Before you install

Low install friction with only two runtime dependencies (pexpect and pyserial). However, the package is abandoned—last commit was 2021-05-18 and no releases since 2019-08-10. It remains archived but not actively maintained.

You must open and manage the serial.Serial connection yourself before passing it to SerialSpawn; the package does not handle port lifecycle.

License in practice

MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

import serial
from pexpect_serial import SerialSpawn

with serial.Serial('COM1', 115200, timeout=0) as ser:
    ss = SerialSpawn(ser)
    ss.sendline('start')
    ss.expect('done')

Verify before relying

  • Whether pexpect and pyserial versions currently available are compatible with this 0.1.0 release.
  • Whether the package works reliably with modern Python versions (3.9+) despite being unmaintained since 2019.

Package facts

Licensepermissive license permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pexpectpyserial
MaintenanceAbandoned 2,561 days since the last release
Last repo commit
First released
Downloads105,104 / month, #12,720 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Evidence: pexpect_serial-0.1.0-py3-none-any.whl

Tags

Capabilities
serial port automationpexpect serial communicationexpect-like serial interactionpyserial command automationserial port pattern matchingterminal emulation over serialserial device scripting
Topics
serial-automationembedded-testing

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “serial port automation”

Give your agent the search over MCP, or paste the wish link into any chat.

More Terminals packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
rich Worth it
PyPI · Terminals · released Apr 2026

Rich renders styled text, tables, progress bars, syntax highlighting, markdown, and tracebacks to the terminal with minimal code.

MITpure Python · 3.9.0+
613.9Mdownloads / mo
colorama Worth it
PyPI · Terminals · released Oct 2022

Colorama makes ANSI escape sequences for colored terminal text work on Windows by intercepting and converting them to win32 API calls, while passing through unchanged on other platforms.

Install it if you need colored terminal output to work on Windows or want to use ANSI-based libraries portably; skip it only if you target non-Windows platforms…

BSD-3-Clausepure Python
431.0Mdownloads / mo
wcwidth Worth it
PyPI · Libraries · released Jun 2026

Measures the displayed width of Unicode strings in terminals, accounting for wide characters, combining marks, and terminal escape sequences that standard Python string functions mishandle.

Install it if your application formats text for terminals and handles non-ASCII characters.

MITpure Python · 3.8+
306.5Mdownloads / mo
ptyprocess With conditions
PyPI · Terminals · released Dec 2020

Run a subprocess in a pseudo terminal (pty) and interact with its input and output, enabling automation of interactive programs that require terminal features like password prompts or curses-style interfaces.

However, note that it is aging (last release 2020-12-28) and not actively maintained; it works well for its narrow, well-defined purpose but won't receive updates for…

ISCpure Pythonaging
205.2Mdownloads / mo
pexpect With conditions
PyPI · Software Development · released Nov 2023

Pexpect spawns and controls interactive console applications by sending input and matching output patterns, automating tasks that would otherwise require manual interaction.

ISCpure Pythonaging
200.8Mdownloads / mo

See also xmodem · pyserial-asyncio · aioserial · serialx · types-pyserial · pyserial-asyncio-fast · types-pexpect · delegator.py · binho-host-adapter