skillfed

adafruit-circuitpython-busdevice

CircuitPython bus device classes to manage bus sharing.

adafruit-circuitpython-busdevice v5.2.17 177.1K downloads/30d#10,225 on PyPI124
Permissive license MIT Active released

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 on this page — 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

adafruit-circuitpython-busdevice on PyPI

pip

pip install adafruit-circuitpython-busdevice

uv

uv add adafruit-circuitpython-busdevice

poetry

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 not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — Adafruit-Blinka, adafruit-circuitpython-typing
Maintenance actively maintained — 113 days since the last release
Last repo commit
First released
Downloads 177,149/month — #10,225 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: adafruit_circuitpython_busdevice-5.2.17-py3-none-any.whl

Keywords: adafruit, spi, i2c, bus, device, micropython, circuitpython

Intended Audience :: DevelopersProgramming Language :: Python :: 3Topic :: Software Development :: Embedded SystemsTopic :: Software Development :: LibrariesTopic :: System :: Hardware

Tags

circuitpython i2c device managementspi bus device helpercircuitpython bus lockingmicrocontroller i2c spi abstractionadafruit bus device librarycircuitpython hardware communication
circuitpythonembedded-systemshardware-abstraction

More Libraries packages