Python

Python CAN bus API

Python is a popular programming language for working with CAN/LIN data from the CANedge.

You can work with the CANedge data in Python in multiple ways:

  1. MF4 decoders: DBC decode your data to Parquet data lakes for large scale analysis
  2. python-can-csscan-mf4: Use our Python package to directly load log files in python-can

Which method should you use?

If your goal is to analyse large amounts of DBC decoded CAN/LIN data (across many log files), we recommend using the MF4 decoders to create a Parquet data lake. This will make it easier to ‘abstract away’ the log file aspect of your data and enables ‘beyond-memory’ analyses. The Parquet data lake can also serve other purposes, such as dashboard visualization.

For more specialized use cases, the python-can-csscan-mf4 package enables direct loading of the CANedge MDF files in the popular python-can library. This is useful if you wish to analyse the raw CAN/LIN frames, replay the data through a USB-to-CAN interface, selectively DBC decode messages/signals, inject conditional logic etc. The integration with python-can also offers several extensions related to e.g. J1939, CANopen, ISO-TP, UDS, XCP and more.