gpiozero
A simple interface to GPIO devices with Raspberry Pi
Decision gist · record as of 2026-08-14
Yes. gpiozero is the standard choice for Raspberry Pi GPIO programming in Python—actively maintained, permissively licensed, low friction to install, and well-documented. It's suitable for beginners learning physical computing and for production hobby/educational projects. Install it if you're working with Raspberry Pi GPIO devices and want to avoid raw pin manipulation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a Raspberry Pi or compatible board with GPIO pins, or mock pins for testing on other systems.
- Low install friction with only three lightweight runtime dependencies (colorzero, importlib-metadata, importlib-resources).
- Actively maintained with a recent release 18 days ago and consistent commit activity; supports current Python versions (3.9–3.12 and PyPy).
License · maintenance · safety
BSD-3-Clause (permissive) — BSD-3-Clause (permissive) allows free use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects.
last release 2026-07-27 (18 days) · last repo commit 2026-07-27 · 2,133 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 435,360 downloads/mo, #6,682 on PyPI
Alternatives
Verify before relying
pip install gpiozero
from gpiozero import LED
from time import sleep
led = LED(17)
led.on()
sleep(1)
led.off()- Whether the package works reliably on all advertised Python implementations (PyPy support level).
- Performance characteristics when controlling many devices simultaneously.
- Compatibility with non-Raspberry Pi GPIO boards beyond what the documentation states.
What it is and what it does
gpiozero is a Python library that simplifies GPIO programming on Raspberry Pi and compatible single-board computers. It provides object-oriented interfaces to common components—LEDs, buttons, sensors, motors—so you can control hardware with just a few lines of code rather than managing raw GPIO pins. The library supports both imperative (direct method calls) and declarative (event-driven) programming styles, and includes a mock pin interface for testing without hardware.
The package abstracts away the complexity of underlying pin libraries, letting you switch between different GPIO backends (RPi.GPIO, pigpio, etc.) without changing your application code. It's designed for physical computing education and hobbyist projects, but scales to more complex setups through its source/values system for composing sensor inputs and device behaviors.
Use it for
- Control an LED or relay directly: turn it on/off or blink it with minimal code.
- Build event-driven circuits: trigger actions when a button is pressed or a sensor detects motion.
- Combine multiple sensors to control an output: e.g., turn on a garden light only when motion is detected AND it's dark.
- Prototype robotics or automation projects without writing low-level GPIO boilerplate.
- Test GPIO logic on a PC using mock pins before deploying to a Raspberry Pi.
- Teach physical computing concepts with readable, beginner-friendly Python syntax.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
gpiozero is the standard choice for Raspberry Pi GPIO programming in Python—actively maintained, permissively licensed, low friction to install, and well-documented. It's suitable for beginners learning physical computing and for production hobby/educational projects. Install it if you're working with Raspberry Pi GPIO devices and want to avoid raw pin manipulation.
Install
gpiozero on PyPI
Before you install
Low install friction with only three lightweight runtime dependencies (colorzero, importlib-metadata, importlib-resources). Actively maintained with a recent release 18 days ago and consistent commit activity; supports current Python versions (3.9–3.12 and PyPy).
Requires a Raspberry Pi or compatible board with GPIO pins, or mock pins for testing on other systems.
License in practice
BSD-3-Clause (permissive) allows free use, modification, and distribution with minimal restrictions, making it suitable for both personal and commercial projects.
Quickstart
pip install gpiozero
from gpiozero import LED
from time import sleep
led = LED(17)
led.on()
sleep(1)
led.off()
Verify before relying
- Whether the package works reliably on all advertised Python implementations (PyPy support level).
- Performance characteristics when controlling many devices simultaneously.
- Compatibility with non-Raspberry Pi GPIO boards beyond what the documentation states.
Package facts
| License | BSD-3-Clause permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagescolorzeroimportlib-metadataimportlib-resources |
| Maintenance | Actively maintained 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 435,360 / month, #6,682 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/StableIntended Audience :: DevelopersIntended Audience :: EducationProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: EducationTopic :: System :: Hardware |
Evidence: gpiozero-2.0.1.post3-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 › “python led button sensor”
- gpiozerogpiozero provides a high-level Python interface for controlling GPIO…
- RPi.GPIORPi.GPIO provides Python control over Raspberry Pi GPIO pins,…
- wledAn asynchronous Python client library for controlling and monitoring…
Give your agent the search over MCP, or paste the wish link into any chat.
More Education packages
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
Sphinx generates professional documentation from reStructuredText source files, producing HTML, PDF, EPUB, and other formats with automatic cross-references, code highlighting, and hierarchical navigation.
progressbar2 renders text-based progress bars in the terminal, handling custom widgets, concurrent bars, unknown-length progress, and clean output around logs and prints.
Represents and manipulates IPv4, IPv6, MAC addresses and related network objects; supports CIDR notation, subnetting, set operations, IANA lookups, and DNS reverse generation.
cuda-python is a metapackage providing Pythonic access to NVIDIA's CUDA platform, bundling low-level bindings, runtime abstractions, and utilities for GPU-accelerated computing from Python.
However, verify that the proprietary NVIDIA license aligns with your project's requirements before committing to it in production or redistributed code.
Provides Pythonic APIs to access CUDA core functionalities including runtime control, compiler, and linker operations from Python.
See also pigpio · RPi.GPIO · gpiod · Adafruit-Blinka · zigpy-zigate · adafruit-circuitpython-requests · numato-gpio · Adafruit-PureIO · pyftdi · adafruit-circuitpython-typing