Registry / devops / tmodbus

tmodbus

JSON →
library0.3.0pypypiunverified

A modern, strongly typed Modbus client library for Python 3.12+ with async support, using Pydantic for data validation. Current version 0.3.0, released 2025-02-20. Active development, monthly releases.

pip install tmodbus
INSTALL
IMPORT
SIG · TMODBUS
T
tmodbus
devopspythonv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncModbusClient
from tmodbus import AsyncModbusClient
from tmodbus import ModbusClient
create_async_tcp_client
from tmodbus import create_async_tcp_client
client
from tmodbus import client

Basic TCP client connecting to localhost:502 and reading 10 holding registers from unit ID 1.

import asyncio from tmodbus import ModbusClient async def main(): async with ModbusClient(host='localhost', port=502) as client: result = await client.read_holding_registers(1, 0, 10) print(result) asyncio.run(main())
Debug
Known issues
breakingRequires Python >=3.12. Using older Python versions results in an import error.
fix
Upgrade to Python 3.12 or later.
affects: <3.12
gotchaAll client methods are async. Must be called with await inside an async context. Calling synchronously without await will raise TypeError or return coroutine.
fix
Ensure the calling function is async and use await.
affects: all
deprecatedUsing positional arguments for network parameters (host, port) is deprecated since 0.2.0. Use keyword arguments instead.
fix
Use ModbusClient(host='...', port=...)
affects: >=0.2.0
Upgrade
Version history
0.3.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
Amazon
1
Resources
tmodbus — pip install tmodbus · libregistry