--- id: async-modbus version: "0.2.3" license: GNU General Public License v3 license_treatment: unclear maintenance: aging --- # async-modbus — Async ModBus python library License: unclear · Maintenance: aging · Downloads: 82.5K/mo ## 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 above — 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 pip install async-modbus uv add async-modbus 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_current - Install friction: low - Maintenance: aging - Downloads: 82.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags async modbus client, modbus tcp rtu async, asyncio modbus library, modbus serial communication, industrial protocol async, modbus-client, industrial-protocol, async-io [View on SkillFed](https://skillfed.io/packages/async-modbus) · [View on PyPI](https://pypi.org/project/async-modbus/)