skillfed

Adafruit-Blinka

CircuitPython APIs for non-CircuitPython versions of Python such as CPython on Linux and MicroPython.

adafruit-blinka v9.2.0 172.4K downloads/30d#10,340 on PyPI536
Permissive license MIT Active released

What it is and what it does

Adafruit-Blinka is a compatibility layer that brings CircuitPython's hardware abstraction APIs to CPython and MicroPython environments. It emulates modules for digital I/O, I2C, SPI, UART, analog input/output, PWM, NeoPixels, keypad scanning, and USB HID, allowing you to write code in CircuitPython style that runs on Linux single-board computers. The package handles platform detection and pin mapping automatically, translating high-level calls into appropriate low-level hardware operations for your host.

The library is designed for developers who want to prototype or deploy applications on platforms running full Python interpreters rather than CircuitPython's minimal runtime. It includes both hardware-driven interfaces using native kernel drivers and software-driven fallbacks for I2C and SPI, making it adaptable to various hardware configurations. Test suites are designed to run on either CircuitPython or CPython plus this compatibility layer to verify API conformance.

Use it for:

  • Prototype and test CircuitPython applications on Linux single-board computers before deploying to CircuitPython boards.
  • Control GPIO, I2C, SPI, and UART peripherals from Python on embedded Linux using CircuitPython-compatible syntax.
  • Write cross-platform hardware tests that run on both CircuitPython devices and CPython/MicroPython hosts.
  • Build applications needing the full Python standard library while controlling low-level hardware interfaces.
  • Emulate NeoPixel, keypad, and PWM functionality on non-CircuitPython platforms for LED and motor control.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adafruit-Blinka emulates CircuitPython APIs on CPython and MicroPython hosts, enabling CircuitPython-style code to run on Linux single-board computers and other non-CircuitPython platforms.

Yes, if you are developing on CPython or MicroPython and need CircuitPython-compatible hardware APIs. The package is actively maintained, has no known vulnerabilities, installs with low friction, and is permissively licensed. Do not install on devices already running CircuitPython, where built-in modules should be used instead.

Install

adafruit-blinka on PyPI

pip

pip install adafruit-blinka

uv

uv add adafruit-blinka

poetry

poetry add adafruit-blinka

Installing Adafruit-Blinka

Before you install

Low install friction with a pure-Python wheel. Active maintenance (last commit 2026-07-30, release 15 days ago). Seven runtime dependencies including Adafruit-PlatformDetect, Adafruit-PureIO, pyftdi, and binho-host-adapter for hardware-specific support.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

pip3 install Adafruit-Blinka

import time
from Adafruit_Blinka import board
from Adafruit_Blinka import digitalio

led = digitalio.DigitalInOut(board.D18)
led.direction = digitalio.Direction.OUTPUT
led.value = True
time.sleep(0.5)

Requires Python 3.9 or later; intended for CPython on GNU/Linux or MicroPython—not for devices already running CircuitPython, where built-in modules should be used instead.

Verify before relying

  • Which specific board types and microcontroller families are fully supported beyond Raspberry Pi.
  • Performance characteristics when using software-driven interfaces (bitbangio) vs. hardware-driven (busio).
  • Compatibility matrix with specific versions of MicroPython implementations.
  • Whether all emulated modules (analogio, keypad, neopixel_write, usb_hid) are production-ready or experimental.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9.0)
Install friction low — pure-Python wheel
Runtime dependencies 7 — Adafruit-PlatformDetect, Adafruit-PureIO, binho-host-adapter, pyftdi, adafruit-circuitpython-typing, sysv_ipc, toml
Maintenance actively maintained — 15 days since the last release
Last repo commit
First released
Downloads 172,351/month — #10,340 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: adafruit_blinka-9.2.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: MicroPython

Tags

circuitpython api emulationcircuitpython on raspberry pigpio abstraction layerhardware interface compatibilitycircuitpython cpython bridgeembedded python hardware controlcross-platform microcontroller api
hardware-abstractionembedded-pythongpio-control

More Software Development packages

typing-extensions

Provides backported and experimental type hints…

permissive · top 100 on PyPI

numpy

NumPy provides an N-dimensional array object…

permissive · top 100 on PyPI

fastapi

FastAPI is a Python web framework for building…

permissive · top 100 on PyPI

annotated-doc

Provides a way to document function parameters,…

permissive · top 100 on PyPI

typer

Typer builds command-line applications from…

permissive · top 1,000 on PyPI

distlib

Distlib provides low-level packaging utilities…

permissive · top 1,000 on PyPI

adafruit-circuitpython-requests

A requests-like HTTP library for CircuitPython…

permissive · top 15,000 on PyPI

Adafruit-PlatformDetect

Detects the chip and board type of single-board…

permissive · top 15,000 on PyPI

adafruit-circuitpython-busdevice

Provides I2CDevice and SPIDevice helper classes…

permissive · top 15,000 on PyPI

adafruit-circuitpython-typing

Provides type annotation definitions for…

permissive · top 15,000 on PyPI

adafruit-circuitpython-connectionmanager

Manages sockets and connections for…

permissive · top 15,000 on PyPI

pymata-express

An asyncio-based Python client for controlling…

agpl · top 15,000 on PyPI

gpiozero

gpiozero provides a high-level Python interface…

permissive · top 15,000 on PyPI

akracer

AKRacer provides precompiled dynamic libraries…

permissive · top 5,000 on PyPI

RPi.GPIO

RPi.GPIO provides Python control over Raspberry…

permissive · top 15,000 on PyPI

pyocd

pyOCD is a Python-based debugger and programmer…

permissive · top 5,000 on PyPI