The python-can library provides Controller Area Network support for
Python, providing common abstractions to
different hardware devices, and a suite of utilities for sending and receiving
messages on a CAN bus.

python-can runs any where Python runs; from high powered computers
with commercial CAN to usb devices right down to low powered devices running
linux such as a BeagleBone or RaspberryPi.

More concretely, some example uses of the library:

Passively logging what occurs on a CAN bus. For example monitoring a
commercial vehicle using its OBD-II port.

Testing of hardware that interacts via CAN. Modules found in
modern cars, motocycles, boats, and even wheelchairs have had components tested
from Python using this library.