Controller Area Network (CAN) support for Python. The python-can package is a python library that provides a high-level and a low-level API for communicating with Controller Area Network (CAN) bus devices. It provides a pythonic interface to the SocketCAN implementation found in the Linux kernel, and it supports multiple platforms and CAN interfaces. The high-level API provides a simple, pythonic interface to the common functionality required to interact with a CAN bus. This includes sending and receiving messages, filtering, and error handling. The low-level API provides direct access to the raw message data and allows more fine-grained control over the CAN bus communication. The package also provides a set of utility functions and classes for common tasks such as bit-level manipulation, error detection and handling, and message parsing.
Provides a common abstraction to different hardware devices
Has utilities for logging, replaying, and viewing
Implements a custom virtual interface, based on python message queues
Wide variety of supported interfaces:
CAN over Serial / SLCAN
IXXAT Virtual CAN Interface
PCAN Basic API
Runs on Linux, Mac OSX and Windows
Does not provide sockets or message queues. Only one application can exclusively use a CAN device.