ezo-driver Python bindings
Linux-only Python bindings for the canonical ezo-driver C library.
Support statement
- Supported host platform: Linux
- Supported transports: Linux I2C and POSIX UART
- Supported Python install mode:
pip install ezo-driverfrom PyPI, with wheels for x86_64 and aarch64 Linux on Python 3.9+; other platforms build from the sdist or the repo checkout - Public package name:
ezo-driver - Public import package:
ezo_driver
Install
python -m pip install ezo-driver
PyPI carries cp39-abi3 manylinux wheels for x86_64 and aarch64 Linux, so any CPython 3.9 or newer installs one without a compiler, a 64-bit Raspberry Pi included. On other platforms pip builds from the sdist, which needs a C compiler and the Python headers.
From the repo root:
python -m pip install .
For development, install it editable with the test dependencies:
python -m pip install -e ".[test]"
python -m pytest bindings/python/tests
The packaging lives at the repo root (pyproject.toml, setup.py, setup.cfg, MANIFEST.in) so the sdist carries the C sources from src/ and platform/linux/ and a wheel can be built from it. setup.cfg tags the wheel cp39-abi3: cffi builds ezo_driver._native against the limited C API, so one wheel per architecture covers every supported Python. The release workflow builds the wheels with cibuildwheel ([tool.cibuildwheel] in pyproject.toml) and publishes them to PyPI.
The shipped ezo_driver._native module holds the C core and the Linux transports only. The tests drive it through the fake transports from tests/fakes/, which bindings/python/tests/_fakes.py compiles into a separate test-only cffi module in a temporary directory each session; this needs a C compiler and the test extra. The C sources are found in the checkout that holds the tests; when the tests run from a copy elsewhere, point EZO_DRIVER_SOURCE_DIR at the checkout.
Public modules
ezo_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.
I2C example
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)
UART example
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)
Design constraints
- 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.
Non-goals
- No implicit sleeps
- No implicit retries
- No implicit reconnect/resynchronization
- No workflow wrapper above the canonical transport and product helpers
Metadata
Release files for ezo-driver 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ezo_driver-0.6.0.tar.gz | 74.9 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ezo_driver-0.6.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 | Details |
| ezo_driver-0.6.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64, Linux glibc 2.28+ ARM64 | Details |
Total release size: 1.3 MB
Release files / ezo_driver-0.6.0.tar.gz
| Download URL | ezo_driver-0.6.0.tar.gz |
|---|---|
| Size | 74.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc7c05a7b64e9b9de0b13d0811aa7c0cf7e3121cb08f6a04b00a950d4f3c8f9d
|
|
BLAKE2b-256 checksum How to use checksums |
366d68f36718123a740ec909c539f4a160dd05f2a0abd6309b7877ff156159f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / ezo_driver-0.6.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | ezo_driver-0.6.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 614.1 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
df42614ea2dee687b351d3598c3c8b2a27f6eac3429b0be69d95bc3017c68b66
|
|
BLAKE2b-256 checksum How to use checksums |
65539f84c374a63dc49f57defc066f710d06707d268f963bfb8ae7ee2b52a815
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / ezo_driver-0.6.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | ezo_driver-0.6.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 606.1 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
4acdca81f526d788fed179bf5b04d29c321823de262d687c65ea8e127b94d3a2
|
|
BLAKE2b-256 checksum How to use checksums |
49b61b135779d1df5ab7cc31ad1d728b08d7fa3dd3d7a4840c08742023e0c64d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency log