async-modbus
Async ModBus python library
What it is and what it does
Async ModBus is a thin wrapper around umodbus that adds async/await support for ModBus client communication. It provides two main classes—AsyncTCPClient and AsyncRTUClient—plus a convenience modbus_for_url() function that accepts connection strings (tcp://, serial://, rfc2217://) and returns a ready-to-use client. The library is async-framework agnostic, working with asyncio, curio, trio, or anyio as long as you provide compatible StreamReader and StreamWriter objects.
The package depends on connio and umodbus. It optionally uses numpy arrays for efficient data handling when available. It supports reading and writing ModBus coils, discrete inputs, holding registers, and input registers across TCP and RTU transports, including remote serial connections via RFC2217.
Use it for:
- Read and write ModBus coils and registers over TCP from an asyncio application using a URL-based connection string.
- Communicate with industrial devices over serial RTU using async/await without blocking the event loop.
- Bridge ModBus RTU over remote RFC2217 serial servers in an async context.
- Integrate ModBus communication into curio, trio, or anyio applications by wrapping raw socket streams.
- Efficiently handle bulk register reads/writes using numpy arrays for reduced memory and faster data manipulation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Async ModBus provides an asynchronous Python client for ModBus communication over TCP and RTU protocols, wrapping umodbus with an object-oriented API that works with asyncio, curio, trio, or anyio.
Yes, with conditions. The package fills a genuine gap for async ModBus clients and has low install friction. However, it is marked Pre-Alpha, has not been released in 296 days, and carries an unclear GPLv3 license declaration. Use it for non-critical applications or internal tools; verify license compatibility and test thoroughly before production deployment.
Install
async-modbus on PyPI
pip
pip install async-modbusuv
uv add async-modbuspoetry
poetry add async-modbusInstalling async-modbus
Before you install
Low install friction; pure Python wheel. Maintenance status is aging—last release 296 days ago with modest repository activity (12 stars), though the repository remains active and not archived.
License in practice
License treatment is unclear; the package declares GNU General Public License v3 but lacks SPDX confirmation. Verify compatibility with your project's licensing requirements before use.
Quickstart
import asyncio
from async_modbus import modbus_for_url
async def main():
client = modbus_for_url("tcp://localhost:15020")
reply = await client.write_coils(slave_id=1, starting_address=1, values=[1, 0, 1, 1])
print(reply)
asyncio.run(main())
Requires Python 3.6 or later. The modbus_for_url() helper depends on connio, which relies on the asyncio event loop; other async frameworks require manual StreamReader/StreamWriter wrapping.
Verify before relying
- Whether the GPLv3 license is correctly declared and compatible with your use case
- Current stability and production readiness given Pre-Alpha development status
Package facts
| License | GNU General Public License v3 (unclear) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — connio, umodbus |
| Maintenance | aging — 296 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,521/month — #14,159 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: async_modbus-0.2.3-py3-none-any.whl
Keywords: modbus, tcp, rtu, async_modbus, asyncio
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
nibeNibe provides async communication with Nibe…
copyleft · top 15,000 on PyPI
uModbusuModbus is a pure Python implementation of the…
copyleft · top 15,000 on PyPI
velbus-aioAn asyncio-based Python library for controlling…
permissive · top 15,000 on PyPI
pymodbusPyModbus is a complete Modbus protocol…
permissive · top 5,000 on PyPI
minimalmodbusMinimalmodbus provides a Python interface to…
permissive · top 15,000 on PyPI
pyModbusTCPA pure-Python Modbus/TCP client and server…
permissive · top 15,000 on PyPI
serialxSerialx provides synchronous and native…
permissive · top 15,000 on PyPI
pyserial-asyncio-fastProvides async I/O support for serial port…
permissive · top 15,000 on PyPI
huawei-solarProvides a Python interface to read and write…
agpl · top 15,000 on PyPI
bacpypes3BACpypes3 is a Python library for building…
permissive · top 15,000 on PyPI