Skip to content

anymodbus

Async-native Modbus RTU client for Python, built on AnyIO and anyserial.

Alpha

The v0.1 surface is implemented and tested but has not yet been exercised against a wide range of real hardware. Expect minor API tweaks before v1.0. See DESIGN.md for the full plan.

What it is

A small, opinionated Modbus RTU client built on AnyIO and anyserial. The design tradeoffs that distinguish it from pymodbus (the dominant existing library):

  • AnyIO-native — works under asyncio, uvloop, and trio.
  • Tx-side enforced 3.5-character inter-frame gap before each send.
  • Idempotent-only retries by default — writes do not silently retry.
  • Strict typingmypy strict plus pyright strict.
  • Required baudrate and parity — no spec-vs-real-device default trap.
  • Narrow scope — RTU client only.

For TCP, ASCII, server-side support, or a battle-tested option, use pymodbus. See Migration from pymodbus for an honest comparison.

What it isn't

  • A Modbus server.
  • A Modbus ASCII implementation.
  • A Modbus TCP implementation (planned for v0.3).
  • A device driver. Vendor-specific register maps and quirks belong in downstream packages layered on top.

Where to start

License

MIT.