{"library":"pymodbusTCP","title":"pyModbusTCP","description":"A simple Modbus/TCP library for Python. Current version 0.3.0, released irregularly. Provides client and server functionality for Modbus TCP communication.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pyModbusTCP"],"cli":null},"imports":["from pyModbusTCP.client import ModbusClient","from pyModbusTCP.server import ModbusServer","from pyModbusTCP import constants"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from pyModbusTCP.client import ModbusClient\n\ntry:\n    c = ModbusClient(host='127.0.0.1', port=502, auto_open=True)\n    if c.read_holding_registers(0, 1):\n        print('success')\nexcept Exception as e:\n    print(f'Error: {e}')","lang":"python","description":"Create a Modbus TCP client, connect, and read holding registers.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}