finds.dev← search

// the find

hardbyte/python-can

★ 1,562 · Python · LGPL-3.0 · updated Jun 2026

The can package provides controller area network support for Python developers

python-can is the de facto standard library for CAN bus communication in Python, abstracting over 20+ hardware interfaces behind a single API. It targets automotive engineers, embedded systems developers, and researchers who need to send, receive, log, or replay CAN traffic from a PC. If you're doing vehicle diagnostics, ECU testing, or industrial automation from Python, this is what you use.

Broad hardware support is the real value here — socketcan, PCAN, Vector, Kvaser, ICS neovi, and a dozen more all share the same Bus interface, so you can swap hardware without rewriting code. The logging ecosystem is genuinely useful: ASC and BLF compatibility means you can replay captures made with expensive CANalyzer/CANoe tools. The async notifier pattern (can.Notifier with listener callbacks) is the right design for high-throughput capture — avoids polling. CAN FD support and in-kernel/in-hardware message filtering mean this isn't just a toy for slow buses.

Most interface drivers are thin ctypes wrappers around vendor DLLs, which means Windows-only for many backends and zero fallback if the DLL ABI changes — this has bitten users repeatedly. The virtual interface is useful for testing but there's no built-in simulation of bus load or error frames, so you can't realistically test error-handling code without real hardware. Higher-layer protocols (UDS, J1939, CANopen) are out of scope, so you'll immediately reach for cantools or python-uds on top of this, and integration between them is left to you. Thread-safety story is inconsistent: ThreadSafeBus exists but not all operations are covered, and mixing async and threaded use is easy to get wrong.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →