gpiozero

A simple interface to GPIO devices with Raspberry Pi

https://github.com/gpiozero/gpiozero

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 54 committers (1.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary

Keywords

education gpio physical-computing python raspberry-pi raspberrypi zero-boilerplate
Last synced: 6 months ago · JSON representation

Repository

A simple interface to GPIO devices with Raspberry Pi

Basic Info
Statistics
  • Stars: 2,053
  • Watchers: 81
  • Forks: 311
  • Open Issues: 189
  • Releases: 0
Topics
education gpio physical-computing python raspberry-pi raspberrypi zero-boilerplate
Created over 10 years ago · Last pushed 8 months ago
Metadata Files
Readme Contributing License

README.rst

========
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/
.. _Ben Nuttall: https://github.com/bennuttall
.. _Dave Jones: https://github.com/waveform80

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
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

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

Pin factories
=============

GPIO Zero builds on a number of underlying pin libraries, including `RPi.GPIO`_
and `pigpio`_, each with their own benefits. 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`_.

.. _RPi.GPIO: https://pypi.org/project/RPi.GPIO
.. _pigpio: https://pypi.org/project/pigpio
.. _changing the pin factory: https://gpiozero.readthedocs.io/en/stable/api_pins.html#changing-the-pin-factory

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

Installation
============

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

.. _raspberrypi.com: https://www.raspberrypi.com/software/
.. _Installing: https://gpiozero.readthedocs.io/en/stable/installing.html

Documentation
=============

Comprehensive documentation is available at https://gpiozero.readthedocs.io/.
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
.. _Development: https://gpiozero.readthedocs.io/en/stable/development.html

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
.. _GitHub discussion board: https://github.com/gpiozero/gpiozero/discussions
.. _Raspberry Pi Stack Exchange: https://raspberrypi.stackexchange.com/
.. _Raspberry Pi Forums: https://forums.raspberrypi.com/

Contributors
============

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

.. _contributors page: https://github.com/gpiozero/gpiozero/graphs/contributors

Owner

  • Name: gpiozero
  • Login: gpiozero
  • Kind: organization
  • Location: UK

A simple interface to GPIO devices with Raspberry Pi

GitHub Events

Total
  • Issues event: 16
  • Watch event: 124
  • Issue comment event: 68
  • Push event: 7
  • Pull request review event: 1
  • Pull request event: 12
  • Fork event: 10
  • Create event: 1
Last Year
  • Issues event: 16
  • Watch event: 124
  • Issue comment event: 68
  • Push event: 7
  • Pull request review event: 1
  • Pull request event: 12
  • Fork event: 10
  • Create event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 1,186
  • Total Committers: 54
  • Avg Commits per committer: 21.963
  • Development Distribution Score (DDS): 0.572
Past Year
  • Commits: 11
  • Committers: 1
  • Avg Commits per committer: 11.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Dave Jones d****e@w****k 508
Ben Nuttall b****n@b****m 414
Andrew Scheller g****b@l****g 155
Claire Pollard c****d@g****m 13
Steveis S****r 9
Martin OHanlon m****n@o****m 8
Stewart s****t@a****k 5
ForToffee F****e 4
SteveAmor s****r 4
Ian Harcombe i****e@g****m 4
Philippe Muller p****r@g****m 3
Martchus m****s@g****t 3
Kosovan Sofiia s****n@g****m 3
Fangchen Li f****i@o****m 3
Ryan Walmsley r****k@g****m 2
Fatih Sarhan f****n@p****m 2
Edward Betts e****d@4****m 2
Jack Wearden j****k@j****k 2
Jeevan M R 1****n@g****m 2
Rick Ansell r****k@n****k 2
chrisruk c****k@g****m 2
BuildTools d****e@g****m 2
Alex Chan a****x@a****t 2
rgm r****d@s****m 2
SteveAmor s****r@n****m 1
Robert Erdin r****e@d****m 1
Fangchen Li f****i@F****l 1
pcopa s****n@g****m 1
goloplo g****o 1
gnicki2000 8****0 1
and 24 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 157
  • Total pull requests: 47
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 1 month
  • Total issue authors: 129
  • Total pull request authors: 26
  • Average comments per issue: 4.55
  • Average comments per pull request: 3.32
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 18
  • Pull requests: 14
  • Average time to close issues: 1 day
  • Average time to close pull requests: 4 days
  • Issue authors: 17
  • Pull request authors: 6
  • Average comments per issue: 1.44
  • Average comments per pull request: 1.0
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • bennuttall (9)
  • baterflyrity (3)
  • MusicalNinjaRandInt (3)
  • flycast (3)
  • HiassofT (2)
  • Kayakbabe (2)
  • thehamzan6 (2)
  • etam (2)
  • roycewilliams (2)
  • AndySchroder (2)
  • KevWal (2)
  • lurch (2)
  • gldrplt (2)
  • EDIflyer (2)
  • Inchworm333 (2)
Pull Request Authors
  • lurch (17)
  • MusicalNinjaRandInt (11)
  • MusicalNinjaDad (4)
  • Siecje (4)
  • Eliotdoesprogramming (2)
  • jmichiels (2)
  • warthog618 (2)
  • numericOverflow (2)
  • mjm41 (2)
  • Leo-C (2)
  • bennuttall (2)
  • kloczek (2)
  • guppy (1)
  • clach04 (1)
  • gnicki2000 (1)
Top Labels
Issue Labels
suggestion (10) documentation (6) bug (5) question (3) new device (3) good first issue (1) help wanted (1)
Pull Request Labels

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 301,385 last-month
  • Total docker downloads: 757,208,662
  • Total dependent packages: 38
    (may contain duplicates)
  • Total dependent repositories: 1,843
    (may contain duplicates)
  • Total versions: 50
  • Total maintainers: 3
pypi.org: gpiozero

A simple interface to GPIO devices with Raspberry Pi

  • Versions: 26
  • Dependent Packages: 38
  • Dependent Repositories: 1,842
  • Downloads: 301,356 Last month
  • Docker Downloads: 757,208,662
Rankings
Docker downloads count: 0.1%
Dependent repos count: 0.3%
Downloads: 0.5%
Dependent packages count: 0.6%
Average: 1.0%
Stargazers count: 1.7%
Forks count: 3.1%
Maintainers (2)
Last synced: 6 months ago
proxy.golang.org: github.com/gpiozero/gpiozero
  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.7%
Dependent repos count: 5.8%
Last synced: 6 months ago
pypi.org: gpiozero-ha

A simple interface to GPIO devices with Raspberry Pi.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 29 Last month
Rankings
Stargazers count: 1.7%
Forks count: 3.0%
Dependent packages count: 10.1%
Average: 13.6%
Dependent repos count: 21.6%
Downloads: 31.4%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite