# modbus-connection > modbus-connection is a small, backend-neutral Modbus connection abstraction for Python. The top-level package is a pure interface — the ModbusConnection / ModbusUnit Protocols — with interchangeable tmodbus and pymodbus backends. An optional modbus_connection.model framework maps a device's registers and coils to typed Python attributes and reads a device in as few Modbus calls as possible. Important notes for working with modbus-connection: - Install with `pip install "modbus-connection[tmodbus]"` or `[pymodbus]`; the bare install pulls neither backend. - A connection is transient and owner-held. Import `ModbusConnection` from the selected backend and construct it with a shared `ModbusTcpParams` / `ModbusUdpParams` / `ModbusTlsParams` / `ModbusSerialParams` dataclass; the first unit operation connects on demand. - Consumers receive a `ModbusUnit` via `connection.for_unit(unit_id)`. - The `modbus_connection.model` framework maps registers/coils to typed attributes on a `Component`; `modbus_connection.model.sunspec` adds SunSpec point types with their unimplemented sentinels. - The library is not Home Assistant specific, but ships helpers and patterns that make it a good fit for Home Assistant integrations. ## Documentation Sets - [Abridged documentation](https://home-assistant-libs.github.io/modbus-connection/llms-small.txt): a compact version of the documentation for modbus-connection, with non-essential content removed - [Complete documentation](https://home-assistant-libs.github.io/modbus-connection/llms-full.txt): the full documentation for modbus-connection ## Notes - The complete documentation includes all content from the official documentation - The content is automatically generated from the same source as the official documentation