--- id: fdt version: "0.3.3" license: Apache 2.0 license_treatment: permissive maintenance: dormant --- # fdt — Flattened Device Tree Python Module License: permissive · Maintenance: dormant · Downloads: 126.6K/mo ## What it is and what it does fdt is a Python module for working with Device Tree data structures, commonly used in embedded systems and bootloaders. It provides parsing and serialization of both binary (.dtb) and source (.dts) formats, allowing developers to read device tree configurations, modify nodes and properties, and convert between formats programmatically. The module includes a command-line tool, pydtc, for batch operations like packing, unpacking, merging, and diffing device tree files. The package has no external runtime dependencies and supports Python 3.5 and later. It is designed for scenarios where the device tree compiler (dtc) is not available or where programmatic manipulation within Python is preferred. The API provides classes for nodes, properties (with typed variants like PropStrings, PropWords, PropBytes), and methods to search, merge, and diff tree structures. Use it for: - Convert binary device tree blobs (.dtb) to human-readable source format (.dts) for inspection and debugging - Programmatically modify device tree nodes and properties in embedded system build pipelines - Merge multiple device tree files into a single tree for complex hardware configurations - Compare two device tree files to identify differences in node and property definitions - Replace the device tree compiler (dtc) tool in environments where a Python-based solution is preferred ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses, manipulates, and converts between Device Tree binary (.dtb) and source (.dts) formats, with support for reading, writing, merging, and diffing device tree structures. Yes, with conditions. Install if you need to manipulate device trees programmatically in Python and can accept dormant maintenance (last release 2022-07-08). The package is stable, dependency-free, and carries no known vulnerabilities, making it suitable for embedded systems work where active development is not expected. Avoid if you require ongoing feature development or support for Python versions beyond 3.10. ## Install pip install fdt uv add fdt poetry add fdt ## Installing fdt Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was 2022-07-08, over 1498 days ago, though the repository remains active with a recent commit on 2024-09-22. Suitable for stable, embedded-systems use cases where active development is not expected. License in practice: Licensed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions. No notable licensing constraints for typical adoption. Quickstart: import fdt with open('example.dtb', 'rb') as f: dtb_data = f.read() dt = fdt.parse_dtb(dtb_data) with open('example.dts', 'w') as f: f.write(dt.to_dts()) Verify before relying: - Whether the package is actively maintained despite dormant status and 1498-day gap since last release - Compatibility with Python versions beyond 3.10 (classifiers list 3.5–3.10 only) ## Package facts - License: Apache 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 126.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags device tree parser, dtb dts converter, flattened device tree, device tree manipulation, embedded systems device tree, dtb to dts conversion, device tree merge diff, embedded-systems, device-tree, firmware [View on SkillFed](https://skillfed.io/packages/fdt) · [View on PyPI](https://pypi.org/project/fdt/)