PyModbus
PyModbusDocs

PyModbus Docs

Python library for Modbus TCP and RTU communication. Connect to PLCs, sensors, and industrial devices with clean synchronous and async APIs.

PyModbus connects Python to any Modbus device: PLCs, power meters, temperature sensors, VFDs, building controllers. It supports TCP (Ethernet), RTU (serial RS485/RS232), and ASCII protocols with the same API.

from pymodbus.client import ModbusTcpClient

client = ModbusTcpClient('192.168.1.100')
client.connect()

result = client.read_holding_registers(0, 10, slave=1)
if not result.isError():
    print(f"Registers: {result.registers}")

client.close()

Get Started

Clients

Reference

Community & Support

Join the Discord community for help, discussions, and to connect with other developers using PyModbus.