skillfed

pymodbus

A fully featured modbus protocol stack in python

pymodbus v3.15.0 1.8M downloads/30d#3,561 on PyPI2,754
Permissive license BSD-3-Clause Active released

What it is and what it does

PyModbus is a mature, production-grade implementation of the Modbus protocol stack in pure Python. It provides three main components: a client for connecting to Modbus devices, a server for emulating devices, and an HTML-based simulator for testing and development. The library supports all standard Modbus frames (socket, RTU, RTU-over-TCP, TCP, ASCII) and communication methods (serial/RS-485, TCP, TLS, UDP), with both synchronous and asynchronous APIs for different application needs.

The package is designed for industrial automation and SCADA applications where Python applications need to communicate with Modbus-compliant devices. It's embedded in projects like Home Assistant and is lightweight with no mandatory third-party dependencies. The library follows a non-standard versioning scheme where Z releases are bug fixes, Y releases include API changes, and X releases indicate major rewrites—the documentation emphasizes checking the API_changes and CHANGELOG files when upgrading between minor versions.

Use it for:

  • Build a Python application that reads sensor data from industrial Modbus devices over TCP or serial connections.
  • Create a virtual Modbus device server to test client applications without physical hardware.
  • Simulate multiple Modbus devices for high-volume testing of SCADA or automation software.
  • Integrate Modbus communication into existing Python projects with minimal dependencies.
  • Monitor and debug Modbus traffic using the web-based simulator interface.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

PyModbus is a complete Modbus protocol implementation providing client, server, and simulator components with both synchronous and asynchronous APIs for industrial device communication.

Yes. PyModbus is a stable, actively maintained library (release 1 day old, 2754 GitHub stars) with no security vulnerabilities, low install friction, and permissive licensing. It's the standard choice for Modbus protocol work in Python and is embedded in production systems like Home Assistant. Install it if you need to communicate with Modbus devices; the only caveat is to review API_changes when upgrading between minor versions, as the project does not follow semantic versioning.

Install

pymodbus on PyPI

pip

pip install pymodbus

uv

uv add pymodbus

poetry

poetry add pymodbus

Installing pymodbus

Before you install

Installation is straightforward with no runtime dependencies by default; pyserial is optional for serial communication. The project is actively maintained with a release just 1 day old, tested across Python 3.10–3.14 on Windows, Linux, and macOS, and carries 2754 GitHub stars.

License in practice

BSD-3-Clause is a permissive license allowing commercial and private use with minimal restrictions; you must include the license text and disclaimer but face no copyleft obligations.

Quickstart

pip install pymodbus

from pymodbus.client import ModbusSerialClient

client = ModbusSerialClient(method='rtu', port='/dev/ttyUSB0')
client.connect()
result = client.read_holding_registers(0, 10)
client.close()

Requires Python >= 3.10.0; serial communication requires optional pyserial dependency (install with pip install pymodbus[serial]).

Verify before relying

  • Whether the 100% test coverage claim and cross-platform CI testing are current as of version 3.15.0.
  • Performance characteristics under high-volume device simulation (hundreds of devices mentioned in description).
  • Specific non-standard device limitations beyond the general statement in the description.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10.0)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 1 days since the last release
Last repo commit
First released
Downloads 1,788,026/month — #3,561 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pymodbus-3.15.0-py3-none-any.whl

Keywords: modbus, asyncio, scada, client, server, simulator

Development Status :: 5 - Production/StableEnvironment :: ConsoleFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: MacOS :: MacOS XOperating System :: MicrosoftOperating System :: OS IndependentOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: System :: NetworkingTopic :: Utilities

Tags

modbus client server libraryindustrial protocol implementationscada communication pythonmodbus tcp serial rtudevice simulator modbusasyncio modbus protocolrs-485 tcp communication
industrial-protocolscadaasyncio

More Utilities packages