minimalmodbus
Easy-to-use Modbus RTU and Modbus ASCII implementation for Python
What it is and what it does
Minimalmodbus is a Python library that acts as a Modbus master, communicating with Modbus slave devices (sensors, controllers, PLCs) over serial connections using the Modbus RTU or Modbus ASCII protocols. It abstracts the low-level protocol details so you can read and write device registers with simple function calls, and includes helpers for working with multi-byte values like floats and strings without manual byte manipulation.
The package depends only on pyserial, a pure-Python serial port library, making it lightweight and portable across Linux, macOS, and Windows. It is marked Production/Stable and supports Python 3.8 and later. Maintenance is dormant (last release July 2023), but the codebase is mature and has been stable since its initial release in 2011, making it suitable for applications where active feature development is not required.
Use it for:
- Read sensor values from industrial instruments over serial links using Modbus RTU or ASCII protocols.
- Write configuration or control commands to Modbus-enabled devices like motor drives, power supplies, or data loggers.
- Poll multiple Modbus slave devices sequentially from a single master application on a PC or embedded Linux system.
- Prototype or integrate legacy industrial equipment that speaks Modbus into a Python automation or monitoring script.
- Handle multi-byte sensor readings (floats, long integers) without manually managing byte order or register packing.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Minimalmodbus provides a Python interface to communicate with Modbus RTU and Modbus ASCII devices over serial connections, handling protocol details and offering convenience functions for floats, strings, and multi-byte integers.
Yes, for stable Modbus RTU and Modbus ASCII serial communication. The package is mature, production-grade, and has minimal dependencies. Dormant maintenance is not a concern if you are integrating with established industrial hardware that does not require protocol updates. Install only if your use case is serial Modbus; verify this package does not support Modbus TCP before committing if that is required.
Install
minimalmodbus on PyPI
pip
pip install minimalmodbusuv
uv add minimalmodbuspoetry
poetry add minimalmodbusInstalling minimalmodbus
Before you install
Low install friction with a single pure-Python dependency (pyserial). Maintenance is dormant—last release was 2023-07-17, over a year ago—but the package is marked Production/Stable and has been actively maintained since 2011. Suitable for stable, established use cases where active development is not expected.
License in practice
Licensed under Apache License 2.0 (permissive). You may use, modify, and distribute the package freely in commercial and private projects, provided you include a copy of the license and do not hold the authors liable.
Quickstart
pip install minimalmodbus
import minimalmodbus
instrument = minimalmodbus.Instrument('/dev/ttyUSB0', 1) # port, slave address
temperature = instrument.read_register(0, 1) # register, decimals
Requires a physical or virtual serial port connected to a Modbus RTU or Modbus ASCII device.
Verify before relying
- Exact scope of 'convenience functions' for floats, strings, and long integers beyond basic register reads.
- Whether the package supports Modbus TCP or only serial (RTU/ASCII) variants.
- Performance characteristics or limits (e.g., max devices per master, request latency).
- Specific serial hardware requirements (e.g., voltage levels, connector types).
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pyserial |
| Maintenance | dormant — 1,124 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 146,831/month — #11,088 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: minimalmodbus-2.1.1-py3-none-any.whl
Keywords: minimalmodbus, modbus, modbus-serial, modbus-RTU, modbus-ASCII
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
pymodbusPyModbus is a complete Modbus protocol…
permissive · top 5,000 on PyPI
uModbusuModbus is a pure Python implementation of the…
copyleft · top 15,000 on PyPI
async-modbusAsync ModBus provides an asynchronous Python…
unclear · top 15,000 on PyPI
huawei-solarProvides a Python interface to read and write…
agpl · top 15,000 on PyPI
pyModbusTCPA pure-Python Modbus/TCP client and server…
permissive · top 15,000 on PyPI
nibeNibe provides async communication with Nibe…
copyleft · top 15,000 on PyPI
python-ipmiPure Python library for communicating with…
copyleft · top 15,000 on PyPI
goodweConnects to GoodWe solar inverters over local…
permissive · top 15,000 on PyPI
pystiebeleltronProvides a Python API to communicate with…
permissive · top 15,000 on PyPI
uart-devicesProvides a Python interface to interact with…
permissive · top 15,000 on PyPI