pyserial is a cross-platform Python library for reading and writing binary data to serial ports and hardware devices. It provides a serial port enumeration tool for identifying available hardware and retrieving device path metadata.
The project includes a network implementation for controlling remote serial port functions and signal lines over TCP/IP via the RFC 2217 standard. It also features a serial-to-TCP bridge for forwarding raw data between local ports and network sockets, as well as a specialized interface for managing half-duplex RS485 communication and RTS toggling.
The library covers broad hardware integration capabilities, including port configuration for baud rates and parity, binary data transmission using file-like interfaces, and port discovery via hardware IDs or regular expressions. It further provides tools for serial traffic interception, loopback connection simulation for testing, and an interactive serial terminal for device communication.