--- id: canmatrix version: "1.2" license: BSD license_treatment: permissive maintenance: active --- # canmatrix License: permissive · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does Canmatrix is a Python library for working with CAN (Controller Area Network) bus database files, which describe automotive and industrial communication protocols. It models CAN communication as Python objects—Boardunits, Frames, Signals, Values—and provides tools to read, write, and convert between multiple database formats used by different vendors and tools. The library supports import from nine file formats (.dbc, .dbf, .kcd, .arxml, .yaml, .xls, .sym, .xml, .ldf, .odx) and export to eight (.dbc, .dbf, .kcd, .xls, .json, .arxml, .yaml, .sym, .xml, .lua, .scapy). It also includes command-line tools (canconvert, cancompare) for batch conversion and comparison, plus extract and merge operations for database manipulation. Use it for: - Convert CAN database files between vendor formats for tool interoperability - Parse and programmatically inspect CAN frame and signal definitions from automotive database files - Generate Wireshark Lua scripts or Scapy packet definitions from CAN database metadata - Compare two CAN database versions to identify changes in frames, signals, or message definitions - Extract subsets of a CAN database or merge multiple databases for modular vehicle projects ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Canmatrix parses, manipulates, and converts CAN bus database files between multiple formats (.dbc, .dbf, .kcd, .arxml, .yaml, .xls, .sym, .xml, .ldf, .odx) and exports to formats including .json, .lua, and .scapy. Yes. Canmatrix is actively maintained, has no known vulnerabilities, installs with low friction, and is the standard tool for CAN database format conversion in Python. Install it if you work with automotive CAN protocols, need to translate between vendor database formats, or want to programmatically inspect CAN message definitions. ## Install pip install canmatrix uv add canmatrix poetry add canmatrix ## Installing canmatrix Before you install: Low friction: pure Python wheel with four lightweight runtime dependencies (attrs, click, typing, importlib-metadata). Actively maintained with recent commits and no known vulnerabilities. License in practice: BSD permissive license allows commercial and private use with minimal restrictions; suitable for most projects without legal friction. Quickstart: pip install canmatrix import canmatrix db = canmatrix.load('example.dbc') db.save('output.json') Verify before relying: - Whether the package supports Python versions listed in classifiers (3.4–3.11) or only modern versions in practice - Whether arxml export is production-ready or remains basic as documented - Exact API for loading and saving CAN database files programmatically ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags CAN bus database parser, dbc file converter, CAN matrix format conversion, automotive CAN tools, CAN database manipulation, automotive, can-bus, protocol-parsing [View on SkillFed](https://skillfed.io/packages/canmatrix) · [View on PyPI](https://pypi.org/project/canmatrix/)