skillfed

async-modbus

Async ModBus python library

async-modbus v0.2.3 82.5K downloads/30d#14,159 on PyPI12
License unclear GNU General Public License v3 AGING released

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-modbus

uv

uv add async-modbus

poetry

poetry add async-modbus

Installing 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

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython

Tags

async modbus clientmodbus tcp rtu asyncasyncio modbus librarymodbus serial communicationindustrial protocol async
modbus-clientindustrial-protocolasync-io

More Networking packages