Linux-only Python bindings for the canonical ezo-driver C library.
- Supported host platform: Linux
- Supported transports: Linux I2C and POSIX UART
- Supported Python install mode for this stage: editable install from the repo checkout
- Public package name:
ezo-driver - Public import package:
ezo_driver
From the repo root:
python -m pip install -e bindings/pythonezo_driver.errorsezo_driver.enumsezo_driver.typesezo_driver.baseezo_driver.i2cezo_driver.uartezo_driver.productezo_driver.parseezo_driver.schemaezo_driver.controlezo_driver.calibration_transferezo_driver.phezo_driver.orpezo_driver.rtdezo_driver.ecezo_driver.doezo_driver.hum
Top-level ezo_driver exports only the stable transport constructors, exception hierarchy, and shared enums/types.
from ezo_driver import LinuxI2CDevice, ProductId
from ezo_driver import control, ph
with LinuxI2CDevice(bus=1, address=0x63) as dev:
wait_ms = control.send_info_query_i2c(dev, ProductId.PH)
info = control.read_info_i2c(dev)
wait_ms = ph.send_read_i2c(dev)
reading = ph.read_response_i2c(dev)
print(info)
print(reading)from ezo_driver import LinuxUARTDevice, ProductId
from ezo_driver import control, ph
with LinuxUARTDevice("/dev/ttyUSB0", baud=9600, read_timeout_ms=1000) as dev:
wait_ms = control.send_info_query_uart(dev, ProductId.PH)
info = control.read_info_uart(dev)
wait_ms = ph.send_read_uart(dev)
reading = ph.read_response_uart(dev)
print(info)
print(reading)- The Python layer stays transport-explicit. There is no unified device abstraction.
- The bindings mirror the C library concepts instead of exposing buffer management.
- Timing hints are returned as integer milliseconds.
- I2C device status codes and UART response kinds stay explicit values in the API.
- No implicit sleeps
- No implicit retries
- No implicit reconnect/resynchronization
- No workflow wrapper above the canonical transport and product helpers