python-can
Controller Area Network interface module for Python
Decision gist · record as of 2026-08-14
Yes. python-can is a mature, actively maintained library with low install friction, no known vulnerabilities, and broad hardware support. The LGPL-3.0 copyleft license requires derivative works to be open-source, which is a constraint for proprietary applications but standard for embedded systems work. Install it if you need to communicate with CAN buses from Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- Hardware interface availability depends on the target platform (socketcan on Linux, PCAN on Windows, etc.) and installed drivers.
- Low install friction with three lightweight runtime dependencies (wrapt, packaging, typing_extensions).
License · maintenance · safety
LGPL-3.0-only (copyleft) — Licensed under LGPL-3.0-only (copyleft). Derivative works and modifications must be distributed under the same license; proprietary applications linking this library may face licensing constraints.
last release 2025-08-12 (367 days) · last repo commit 2026-07-01 · 1,582 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,201,381 downloads/mo, #2,142 on PyPI
Alternatives
Verify before relying
pip install python-can
import can
with can.Bus(interface='socketcan', channel='vcan0') as bus:
message = can.Message(arbitration_id=123, data=[0x11, 0x22, 0x33])
bus.send(message)
for msg in bus:
print(f"{msg.arbitration_id:X}: {msg.data}")- Whether all advertised backends (socketcan, PCAN, Vector, Kvaser, etc.) are equally well-maintained and tested in version 4.6.1.
- Performance characteristics and latency guarantees for real-time CAN communication on different platforms.
- Compatibility with specific CAN hardware devices and whether driver installation is required beyond the Python package.
What it is and what it does
python-can is a library that abstracts CAN bus communication for Python developers, allowing them to send and receive messages on Controller Area Network interfaces used in automotive, industrial, and embedded systems. It provides a unified API across multiple hardware backends and operating systems (Linux, macOS, Windows), handling the low-level details of different CAN controllers and protocols.
The library supports standard and extended arbitration IDs, CAN FD (flexible data rate), message filtering, and multiple logging formats (ASC, BLF, MF4, CSV, SQLite). It includes command-line tools for bus inspection and a notifier system for asynchronous message handling. With active maintenance, broad platform support, and a stable API, it serves as the primary Python interface for CAN bus work in automotive and embedded applications.
Use it for
- Develop automotive diagnostic tools or vehicle telemetry systems that read CAN messages from car networks.
- Log and replay CAN bus traffic for testing and debugging embedded systems in manufacturing or robotics.
- Build real-time monitoring dashboards for industrial equipment or wheelchairs that communicate over CAN.
- Integrate CAN communication into Python-based control systems for boats, trucks, or other vehicles.
- Automate testing of CAN-based hardware by sending and validating message sequences.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
python-can is a mature, actively maintained library with low install friction, no known vulnerabilities, and broad hardware support. The LGPL-3.0 copyleft license requires derivative works to be open-source, which is a constraint for proprietary applications but standard for embedded systems work. Install it if you need to communicate with CAN buses from Python.
Install
python-can on PyPI
Before you install
Low install friction with three lightweight runtime dependencies (wrapt, packaging, typing_extensions). Active maintenance with recent commits and a stable production release cycle.
Requires Python 3.9 or later. Hardware interface availability depends on the target platform (socketcan on Linux, PCAN on Windows, etc.) and installed drivers.
License in practice
Licensed under LGPL-3.0-only (copyleft). Derivative works and modifications must be distributed under the same license; proprietary applications linking this library may face licensing constraints.
Quickstart
pip install python-can
import can
with can.Bus(interface='socketcan', channel='vcan0') as bus:
message = can.Message(arbitration_id=123, data=[0x11, 0x22, 0x33])
bus.send(message)
for msg in bus:
print(f"{msg.arbitration_id:X}: {msg.data}")
Verify before relying
- Whether all advertised backends (socketcan, PCAN, Vector, Kvaser, etc.) are equally well-maintained and tested in version 4.6.1.
- Performance characteristics and latency guarantees for real-time CAN communication on different platforms.
- Compatibility with specific CAN hardware devices and whether driver installation is required beyond the Python package.
Package facts
| License | LGPL-3.0-only copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packageswraptpackagingtyping_extensions |
| Maintenance | Actively maintained 367 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,201,381 / month, #2,142 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyIntended Audience :: ManufacturingIntended Audience :: Telecommunications IndustryNatural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Embedded SystemsTopic :: Software Development :: Embedded Systems :: Controller Area Network (CAN)Topic :: System :: Hardware :: Hardware DriversTopic :: System :: LoggingTopic :: System :: MonitoringTopic :: System :: NetworkingTopic :: Utilities |
Evidence: python_can-4.6.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “CAN bus communication”
- python-canProvides Python abstractions and utilities for Controller Area…
- dronecanImplements the DroneCAN v1 protocol stack in Python for reliable CAN…
- cantoolsCantools parses automotive CAN bus database files (DBC, KCD, SYM,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also canopen · dronecan · spidev · cantools · icsneopy · smbus2 · azure-servicebus · adafruit-circuitpython-busdevice · ovos-bus-client · BAC0