python-devicetree
This is part of an ongoing effort to extract the Zephyr Project’s devicetree tools to a standalone location for wider use.
This is version 0.0.2. It is based on the Zephyr tools as of commit f5409dec01.
Quickstart
$ pip3 install devicetree
$ python3
[...]
>>> from devicetree import edtlib, dtlib
Then you should be able to use edtlib and dtlib in the same way Zephyr does with its in-tree versions of these modules.
This is meant as a way to get started. Breaking API changes to make this code easier to use standalone are possible.