--- id: adafruit-circuitpython-busdevice version: "5.2.17" license: MIT license_treatment: permissive maintenance: active --- # adafruit-circuitpython-busdevice — CircuitPython bus device classes to manage bus sharing. License: permissive · Maintenance: active · Downloads: 177.1K/mo ## What it is and what it does Adafruit CircuitPython BusDevice is a helper library for managing I2C and SPI bus communication on CircuitPython microcontroller boards. It provides I2CDevice and SPIDevice classes that wrap low-level bus operations with transaction state management—locking the bus to prevent concurrent access conflicts, handling chip select and protocol mode changes for SPI, and managing device addressing for I2C. The library abstracts away common boilerplate, making it easier to write reliable hardware drivers. The package is designed for embedded systems and microcontroller projects where multiple devices may share a single bus. It depends on Adafruit-Blinka and adafruit-circuitpython-typing. Note that CircuitPython v6.3.0 and newer may include this package as builtin firmware; the documentation recommends checking your board's module support matrix to avoid conflicts if both the builtin and add-on versions are present. Use it for: - Manage I2C communication with multiple sensors or peripherals on a shared bus without race conditions. - Handle SPI device transactions with automatic chip select and protocol mode management. - Simplify driver development for CircuitPython-compatible boards by abstracting bus locking and state. - Ensure safe concurrent access to shared hardware buses in multi-device embedded projects. - Port hardware drivers between different CircuitPython boards with consistent bus abstractions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides I2CDevice and SPIDevice helper classes that manage bus transactions, locking, chip select, and protocol state for CircuitPython microcontroller projects. Yes, if you are developing CircuitPython projects that use I2C or SPI buses. The library is actively maintained, has no known vulnerabilities, and solves a real problem in embedded systems—managing bus state and preventing conflicts. Check your board's firmware first to confirm whether it's already builtin; if not, the low-friction install and permissive MIT license make it a straightforward addition. Not relevant for standard Python environments. ## Install pip install adafruit-circuitpython-busdevice uv add adafruit-circuitpython-busdevice poetry add adafruit-circuitpython-busdevice ## Installing adafruit-circuitpython-busdevice Before you install: Low friction install with just two runtime dependencies. Actively maintained with latest release on 2026-04-23. Note: CircuitPython v6.3.0 and newer may include this package builtin; check your board's firmware to avoid import conflicts if both versions are present. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install adafruit-circuitpython-busdevice from adafruit_circuitpython_busdevice.i2c_device import I2CDevice device = I2CDevice(i2c_bus, device_address) with device: device.write(data) Requires a CircuitPython-compatible microcontroller board or GNU/Linux system with CircuitPython support; check your board's firmware to confirm bus_device availability. Verify before relying: - Whether the package works on standard CPython or only CircuitPython environments. - Specific Python version requirements (requires_python is unspecified in metadata). - Performance characteristics or throughput limits for high-frequency bus transactions. - Exact usage patterns and API surface beyond the I2CDevice and SPIDevice classes mentioned. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 177.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags circuitpython i2c device management, spi bus device helper, circuitpython bus locking, microcontroller i2c spi abstraction, adafruit bus device library, circuitpython hardware communication, circuitpython, embedded-systems, hardware-abstraction [View on SkillFed](https://skillfed.io/packages/adafruit-circuitpython-busdevice) · [View on PyPI](https://pypi.org/project/adafruit-circuitpython-busdevice/)