Skip to content

Software

GPIO Zero

By gpiozero, United Kingdom (checked on github.com/gpiozero (opens in a new tab)), from github.com/gpiozero/gpiozero (opens in a new tab)

  • Microcontrollers and firmware tools
  • Library
  • BSD-3-Clause

A Python library giving simple access to GPIO components such as LEDs, buttons and sensors on Raspberry Pi. It offers an easy entry point to physical computing.

Facts

GitHub stars
2,137read on 28 Nov 2026
Last update
28 Jul 2026Newest commit on main
Maintenance
Maintaineda commit in the last 12 months
Difficulty
Beginner
Hardware it needs, as the project states it
Raspberry Pi. It is installed by default in the Raspberry Pi OS desktop images; other operating systems, including PCs using remote GPIO or mock pins, are also covered in the documentation.

Checked on GitHub on 28 Nov 2026.

Licenses

Code
BSD-3-Clause (opens in a new tab)

Read by Robotheca from LICENSE.rst (opens in a new tab) (BSD-3-Clause) at commit 4e60a6a (opens in a new tab), on 16 Oct 2026.

Commercial use
Yes

At a glance

What it is
  • Provides ready-made interfaces for everyday components like LEDs, buttons, sensors, converters, full-colour LEDs and robotics kits.
  • Lets beginners write a few lines of Python to blink an LED or link a button to an LED.
  • Supports a declarative style where devices are connected through source tools that describe their behaviour.
  • Builds on several underlying pin libraries, selectable for the whole script or per device.
  • Includes a mock pin interface for testing without hardware.

Robotheca's summary of the project's documents, not the creator's words.

Robots on Robotheca
No robot on Robotheca uses it yet.
Licence
BSD-3-Clause. Commercial use: Yes. Where it was read
Install
In the creator's words: The project's website (opens in a new tab)
Maintenance
Maintained, last commit on 28 Jul 2026.

Use it

How to install it, in the creator's words: The project's website (opens in a new tab)

Robotheca doesn't review code. Read it before running it.

Files and versions

Facts read at commit 4e60a6a

Robotheca never hosts the code: each link goes to the creator's own page.

The README

The creator's own README, copied as written: README.rst by gpiozero, at commit 4e60a6a, under BSD-3-Clause (opens in a new tab). The original on GitHub (opens in a new tab).

Read the README here

======== gpiozero

A simple interface to GPIO devices with Raspberry Pi, developed and maintained by Ben Nuttall and Dave Jones_.

.. _Raspberry Pi: https://www.raspberrypi.com/ (opens in a new tab) .. _Ben Nuttall: https://github.com/bennuttall (opens in a new tab) .. _Dave Jones: https://github.com/waveform80 (opens in a new tab)

About

Component interfaces are provided to allow a frictionless way to get started with physical computing:

.. code:: python

from gpiozero import LED
from time import sleep

led = LED(17)

while True:
    led.on()
    sleep(1)
    led.off()
    sleep(1)

With very little code, you can quickly get going connecting your components together:

.. code:: python

from gpiozero import LED, Button
from signal import pause

led = LED(17)
button = Button(3)

button.when_pressed = led.on
button.when_released = led.off

pause()

You can advance to using the declarative paradigm along with provided source tools_ to describe the behaviour of devices and their interactions:

.. code:: python

from gpiozero import OutputDevice, MotionSensor, LightSensor
from gpiozero.tools import booleanized, all_values
from signal import pause

garden = OutputDevice(17)
motion = MotionSensor(4)
light = LightSensor(5)

garden.source = all_values(booleanized(light, 0, 0.1), motion)

pause()

See the chapter on Source/Values_ for more information.

.. _Source/Values: https://gpiozero.readthedocs.io/en/stable/source_values.html (opens in a new tab) .. _source tools: https://gpiozero.readthedocs.io/en/stable/api_tools.html (opens in a new tab)

The library includes interfaces to many simple everyday components, as well as some more complex things like sensors, analogue-to-digital converters, full colour LEDs, robotics kits and more. See the Recipes_ chapter of the documentation for ideas on how to get started.

.. _Recipes: https://gpiozero.readthedocs.io/en/stable/recipes.html (opens in a new tab)

Pin factories

GPIO Zero builds on a number of underlying pin libraries. You can select a particular pin library to be used, either for the whole script or per-device, according to your needs. See the section on changing the pin factory_.

.. _changing the pin factory: https://gpiozero.readthedocs.io/en/stable/api_pins.html#changing-the-pin-factory (opens in a new tab)

A "mock pin" interface is also provided for testing purposes. Read more about this in the section on mock pins_.

.. _mock pins: https://gpiozero.readthedocs.io/en/stable/api_pins.html#mock-pins (opens in a new tab)

Installation

GPIO Zero is installed by default in the Raspberry Pi OS desktop images, available from raspberrypi.com. To install on Raspberry Pi OS Lite or other operating systems, including for PCs using remote GPIO or mock pins, see the Installing chapter.

.. _raspberrypi.com: https://www.raspberrypi.com/software/ (opens in a new tab) .. _Installing: https://gpiozero.readthedocs.io/en/stable/installing.html (opens in a new tab)

Documentation

Comprehensive documentation is available at https://gpiozero.readthedocs.io/ (opens in a new tab). Please refer to the Contributing_ and Development_ chapters in the documentation for information on contributing to the project.

.. _Contributing: https://gpiozero.readthedocs.io/en/stable/contributing.html (opens in a new tab) .. _Development: https://gpiozero.readthedocs.io/en/stable/development.html (opens in a new tab)

Issues and questions

If you have a feature request or bug report, please open an issue on GitHub. If you have a question or need help, this may be better suited to our GitHub discussion board, the Raspberry Pi Stack Exchange_ or the Raspberry Pi Forums_.

.. _issue on GitHub: https://github.com/gpiozero/gpiozero/issues/new (opens in a new tab) .. _GitHub discussion board: https://github.com/gpiozero/gpiozero/discussions (opens in a new tab) .. _Raspberry Pi Stack Exchange: https://raspberrypi.stackexchange.com/ (opens in a new tab) .. _Raspberry Pi Forums: https://forums.raspberrypi.com/ (opens in a new tab)

Contributors

  • Alex Chan_
  • Alex Eames_
  • Andrew Scheller_
  • Barry Byford_
  • Cameron Davidson-Pilon_
  • Carl Monk_
  • Chris R_
  • Claire Pollard_
  • Clare Macrae_
  • Dan Jackson_
  • Daniele Procida_
  • damosurfer_
  • Dariusz Kowalczyk_
  • David Glaude_
  • Delcio Torres_
  • Edward Betts_
  • Fatih Sarhan_
  • Fangchen Li_
  • G.S._
  • gnicki_
  • Ian Harcombe_
  • Jack Wearden_
  • Jeevan M R_
  • Josh Thorpe_
  • Kyle Morgan_
  • Linus Groh_
  • Mahallon_
  • Maksim Levental_
  • Martchus_
  • Martin O'Hanlon_
  • Mike Kazantsev_
  • Paulo Mateus_
  • Phil Howard_
  • Philippe Muller_
  • Rick Ansell_
  • Rimas Misevičius_
  • Robert Erdin_
  • Russel Winder_
  • Ryan Walmsley_
  • Schelto van Doorn_
  • Sofiia Kosovan_
  • Steve Amor_
  • Stewart Adcock_
  • Thijs Triemstra_
  • Tim Golden_
  • Yisrael Dov Lebow_

See the contributors page_ on GitHub for more info.

.. _Alex Chan: https://github.com/gpiozero/gpiozero/commits?author=alexwlchan (opens in a new tab) .. _Alex Eames: https://github.com/gpiozero/gpiozero/commits?author=raspitv (opens in a new tab) .. _Andrew Scheller: https://github.com/gpiozero/gpiozero/commits?author=lurch (opens in a new tab) .. _Barry Byford: https://github.com/gpiozero/gpiozero/commits?author=ukBaz (opens in a new tab) .. _Cameron Davidson-Pilon: https://github.com/gpiozero/gpiozero/commits?author=CamDavidsonPilon (opens in a new tab) .. _Carl Monk: https://github.com/gpiozero/gpiozero/commits?author=ForToffee (opens in a new tab) .. _Chris R: https://github.com/gpiozero/gpiozero/commits?author=chrisruk (opens in a new tab) .. _Claire Pollard: https://github.com/gpiozero/gpiozero/commits?author=tuftii (opens in a new tab) .. _Clare Macrae: https://github.com/gpiozero/gpiozero/commits?author=claremacrae (opens in a new tab) .. _Dan Jackson: https://github.com/gpiozero/gpiozero/commits?author=e28eta (opens in a new tab) .. _Daniele Procida: https://github.com/evildmp (opens in a new tab) .. _Dariusz Kowalczyk: https://github.com/gpiozero/gpiozero/commits?author=darton (opens in a new tab) .. _damosurfer: https://github.com/gpiozero/gpiozero/commits?author=damosurfer (opens in a new tab) .. _David Glaude: https://github.com/gpiozero/gpiozero/commits?author=dglaude (opens in a new tab) .. _Delcio Torres: https://github.com/gpiozero/gpiozero/commits?author=delciotorres (opens in a new tab) .. _Edward Betts: https://github.com/gpiozero/gpiozero/commits?author=edwardbetts (opens in a new tab) .. _Fatih Sarhan: https://github.com/gpiozero/gpiozero/commits?author=f9n (opens in a new tab) .. _Fangchen Li: https://github.com/gpiozero/gpiozero/commits?author=fangchenli (opens in a new tab) .. _G.S.: https://github.com/gpiozero/gpiozero/commits?author=gszy (opens in a new tab) .. _gnicki: https://github.com/gpiozero/gpiozero/commits?author=gnicki2000 (opens in a new tab) .. _Ian Harcombe: https://github.com/gpiozero/gpiozero/commits?author=MrHarcombe (opens in a new tab) .. _Jack Wearden: https://github.com/gpiozero/gpiozero/commits?author=NotBobTheBuilder (opens in a new tab) .. _Jeevan M R: https://github.com/gpiozero/gpiozero/commits?author=jee1mr (opens in a new tab) .. _Josh Thorpe: https://github.com/gpiozero/gpiozero/commits?author=ThorpeJosh (opens in a new tab) .. _Kyle Morgan: https://github.com/gpiozero/gpiozero/commits?author=knmorgan (opens in a new tab) .. _Linus Groh: https://github.com/gpiozero/gpiozero/commits?author=linusg (opens in a new tab) .. _Mahallon: https://github.com/gpiozero/gpiozero/commits?author=Mahallon (opens in a new tab) .. _Maksim Levental: https://github.com/gpiozero/gpiozero/commits?author=makslevental (opens in a new tab) .. _Martchus: https://github.com/gpiozero/gpiozero/commits?author=Martchus (opens in a new tab) .. _Martin O'Hanlon: https://github.com/martinohanlon/commits?author=martinohanlon (opens in a new tab) .. _Mike Kazantsev: https://github.com/gpiozero/gpiozero/commits?author=mk-fg (opens in a new tab) .. _Paulo Mateus: https://github.com/gpiozero/gpiozero/commits?author=SrMouraSilva (opens in a new tab) .. _Phil Howard: https://github.com/gpiozero/gpiozero/commits?author=Gadgetoid (opens in a new tab) .. _Philippe Muller: https://github.com/gpiozero/gpiozero/commits?author=pmuller (opens in a new tab) .. _Rick Ansell: https://github.com/gpiozero/gpiozero/commits?author=ricksbt (opens in a new tab) .. _Rimas Misevičius: https://github.com/gpiozero/gpiozero/commits?author=rmisev (opens in a new tab) .. _Robert Erdin: https://github.com/gpiozero/gpiozero/commits?author=roberterdin (opens in a new tab) .. _Russel Winder: https://github.com/russel (opens in a new tab) .. _Ryan Walmsley: https://github.com/gpiozero/gpiozero/commits?author=ryanteck (opens in a new tab) .. _Schelto van Doorn: https://github.com/gpiozero/gpiozero/commits?author=goloplo (opens in a new tab) .. _Sofiia Kosovan: https://github.com/gpiozero/gpiozero/commits?author=SofiiaKosovan (opens in a new tab) .. _Steve Amor: https://github.com/gpiozero/gpiozero/commits?author=SteveAmor (opens in a new tab) .. _Stewart Adcock: https://github.com/gpiozero/gpiozero/commits?author=stewartadcock (opens in a new tab) .. _Thijs Triemstra: https://github.com/gpiozero/gpiozero/commits?author=thijstriemstra (opens in a new tab) .. _Tim Golden: https://github.com/gpiozero/gpiozero/commits?author=tjguk (opens in a new tab) .. _Yisrael Dov Lebow: https://github.com/gpiozero/gpiozero/commits?author=yisraeldov (opens in a new tab)

.. _contributors page: https://github.com/gpiozero/gpiozero/graphs/contributors (opens in a new tab)

Robotheca lists software as a reference: nothing is hosted or run here, and every fact links to where it was read.