This commit is contained in:
2026-03-21 10:53:02 +01:00
parent 3a6c07513c
commit ccfeb6f2c1
1997 changed files with 361936 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
SPDX-License-Identifier: BSD-3-Clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

View File

@@ -0,0 +1,261 @@
Metadata-Version: 2.1
Name: gpiozero
Version: 2.0.1
Summary: A simple interface to GPIO devices with Raspberry Pi
Home-page: https://gpiozero.readthedocs.io/
Author: Ben Nuttall
Author-email: ben@bennuttall.com
License: BSD-3-Clause
Project-URL: Documentation, https://gpiozero.readthedocs.io/
Project-URL: Source Code, https://github.com/gpiozero/gpiozero
Project-URL: Issue Tracker, https://github.com/gpiozero/gpiozero/issues
Keywords: raspberrypi gpio
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Developers
Classifier: Topic :: Education
Classifier: Topic :: System :: Hardware
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.9
License-File: LICENSE.rst
Requires-Dist: colorzero
Requires-Dist: importlib-metadata (~=4.6) ; python_version < "3.10"
Requires-Dist: importlib-resources (~=5.0) ; python_version < "3.10"
Provides-Extra: doc
Requires-Dist: sphinx-rtd-theme (>=1.0) ; extra == 'doc'
Requires-Dist: sphinx (>=4.0) ; extra == 'doc'
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
========
gpiozero
========
A simple interface to GPIO devices with `Raspberry Pi`_, developed and
maintained by `Ben Nuttall`_ and `Dave Jones`_.
.. _Raspberry Pi: https://www.raspberrypi.org/
.. _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.org`_. To install on Raspberry Pi OS Lite or other
operating systems, including for PCs using remote GPIO, see the `Installing`_
chapter.
.. _raspberrypi.org: https://www.raspberrypi.org/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://www.raspberrypi.org/forums/
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

View File

@@ -0,0 +1,68 @@
../../../bin/pinout,sha256=7Ts0dgDQWGp01LBESyx8gigzZhW_6EDOPUQPwKkU8GY,256
../../../bin/pintest,sha256=2FqycYoAA3vQH8H1yUstcAdy_OfHVfOzkezqgTtg5TY,257
gpiozero-2.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
gpiozero-2.0.1.dist-info/LICENSE.rst,sha256=tv3Vh_PcOpuMxa2uAJGOP_qQmxCSvU3s9-ixsI-l0Ps,1474
gpiozero-2.0.1.dist-info/METADATA,sha256=NI6G64xwnYuYgvVv4t31lCzAKcg6V2rL9hyZYLGERic,9946
gpiozero-2.0.1.dist-info/RECORD,,
gpiozero-2.0.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
gpiozero-2.0.1.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
gpiozero-2.0.1.dist-info/entry_points.txt,sha256=hHfrs_tpDalZm7lfTX9_R94ePkwTD_ME7ga8zuVGZFQ,540
gpiozero-2.0.1.dist-info/top_level.txt,sha256=eY0E5NV30JrC-UrQZGpXUe_tuWplAuScNI10Pm9_Tf0,21
gpiozero/__init__.py,sha256=vgz0cl6_PPoRUGEi6M1msHqj6s9VUI88WH1OLy6h8JQ,2675
gpiozero/__pycache__/__init__.cpython-311.pyc,,
gpiozero/__pycache__/boards.cpython-311.pyc,,
gpiozero/__pycache__/compat.cpython-311.pyc,,
gpiozero/__pycache__/devices.cpython-311.pyc,,
gpiozero/__pycache__/exc.cpython-311.pyc,,
gpiozero/__pycache__/input_devices.cpython-311.pyc,,
gpiozero/__pycache__/internal_devices.cpython-311.pyc,,
gpiozero/__pycache__/mixins.cpython-311.pyc,,
gpiozero/__pycache__/output_devices.cpython-311.pyc,,
gpiozero/__pycache__/spi_devices.cpython-311.pyc,,
gpiozero/__pycache__/threads.cpython-311.pyc,,
gpiozero/__pycache__/tones.cpython-311.pyc,,
gpiozero/__pycache__/tools.cpython-311.pyc,,
gpiozero/boards.py,sha256=mo3vOmVjd_SPhJUqixI_N6_7n4cnCOrqKIkFiEH3sLM,103292
gpiozero/compat.py,sha256=CUQC-eyGSd0ATRQ3j6dgkbeXI1L4CgMzBm3tN5-lf2E,1259
gpiozero/devices.py,sha256=vnbaai0WbzMmWXVB05sCQLXBGKiehNKYEg-NcGqiZ6U,24888
gpiozero/exc.py,sha256=YfQ7KbsoLtnEFe0YEyqO_516ES1A5N7UHjLMTMhGz5o,7566
gpiozero/fonts/14seg.txt,sha256=VAzTbA13Wp5C_Nv8Yw8d0DOK181_-4tuZyTC5OjzENc,2711
gpiozero/fonts/7seg.txt,sha256=oWrQeNWba7mglb0Vk_T9bHOMfSMeSDNNcPVH_zvWSKc,1112
gpiozero/fonts/__init__.py,sha256=aY9utpFK92iL4wMaH1UdaN6Z_zXfBIA61iTrbEYUt9Q,9110
gpiozero/fonts/__pycache__/__init__.cpython-311.pyc,,
gpiozero/input_devices.py,sha256=lnYaQ9zoDIQgdOtMpWgbwN2PrS4GUgHQF_8SobFLH9E,54898
gpiozero/internal_devices.py,sha256=afBta6ibHxgnFcSHkjNphBfwJZ0ZEHrx7tOgek8JBfk,26753
gpiozero/mixins.py,sha256=l8y6rvipyGdzLa519YSLy1HV7Epag8xx7xPyckrbMPY,20948
gpiozero/output_devices.py,sha256=Kb4aIMuFrBK1EnGfTn3rTACAQqLs7WrpJEab-BpYWa0,62189
gpiozero/pins/__init__.py,sha256=2OJJwBIrl7XTUvYtiESLi31_tKL5-_i7ZCCpxnFozUA,52421
gpiozero/pins/__pycache__/__init__.cpython-311.pyc,,
gpiozero/pins/__pycache__/data.cpython-311.pyc,,
gpiozero/pins/__pycache__/lgpio.cpython-311.pyc,,
gpiozero/pins/__pycache__/local.cpython-311.pyc,,
gpiozero/pins/__pycache__/mock.cpython-311.pyc,,
gpiozero/pins/__pycache__/native.cpython-311.pyc,,
gpiozero/pins/__pycache__/pi.cpython-311.pyc,,
gpiozero/pins/__pycache__/pigpio.cpython-311.pyc,,
gpiozero/pins/__pycache__/rpigpio.cpython-311.pyc,,
gpiozero/pins/__pycache__/spi.cpython-311.pyc,,
gpiozero/pins/__pycache__/style.cpython-311.pyc,,
gpiozero/pins/data.py,sha256=rfV90pvqtiUiLx1oZMaGjqRU0LnuoTrvqx5CYUSR-bQ,59443
gpiozero/pins/lgpio.py,sha256=KwNCQ_JOpMJhTZiwjGWnxg9Vex3fHsZEph87SWE_6MA,12487
gpiozero/pins/local.py,sha256=FBoApnc5iiURpldL3ztL7FCP0LrKCiOMX89m2STG_7M,6753
gpiozero/pins/mock.py,sha256=yYNL2Di5Kvbj7cfDoXgE1k7fVjmSY-lIA6N_3kNKTIo,18843
gpiozero/pins/native.py,sha256=4-Rpitdv_AGOYvt1YmObzsRLLUKBN-5AXBgtU0H9epU,21217
gpiozero/pins/pi.py,sha256=rNCqpKdWt_Ad3ybiBr4mGALeZSAUjnDbN2lTthc1pS4,26508
gpiozero/pins/pigpio.py,sha256=jtChOvcGtBB-q6ByN3DDFeImSQGTHZczkAEt6O4iuOs,21656
gpiozero/pins/rpigpio.py,sha256=f3TzZes1jE2-w0MKxLejhMOswzM6Crsi-eBMWqMrFNo,7179
gpiozero/pins/spi.py,sha256=j2p3sObP0QXJ724K4IWu65z_zF0u3ktULbUSheCzRmY,7842
gpiozero/pins/style.py,sha256=uk8TUFZam6T4vdhxnwWoYwDcO5LqkLiYcoykntSkae4,2728
gpiozero/spi_devices.py,sha256=_hclUePPVVRp27rPuu6Ch_rvo-mZBqIUK6NN6OFk0Q0,20068
gpiozero/threads.py,sha256=pURz6gEc1j6GWBSfreDPrworpLwFEfg1w41BenjI7vE,1633
gpiozero/tones.py,sha256=LzuxQsFdE7JkqPMcRGQ-_c1ue8VeVm1e-c5VirrOn3k,8582
gpiozero/tools.py,sha256=NW59Q5njTkLKIZbvuyne2pV9I6CnMdXZ4VDOLxgrgUk,21372
gpiozerocli/__init__.py,sha256=vjuxwIFi44Jwxpl9mhDqh2bZzmNmWiCur5M2jd6mR9w,2398
gpiozerocli/__pycache__/__init__.cpython-311.pyc,,
gpiozerocli/__pycache__/pinout.cpython-311.pyc,,
gpiozerocli/__pycache__/pintest.cpython-311.pyc,,
gpiozerocli/pinout.py,sha256=N95KJzUzKUrq4ANYjzIs_PMRrGehYqve9vso_cJHeic,2640
gpiozerocli/pintest.py,sha256=lyPRCb1uJWJlx5L88aPpmnjASSj3YIqGg1BfIsVJSXE,5410

View File

@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.37.1)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,17 @@
[console_scripts]
pinout = gpiozerocli.pinout:main
pintest = gpiozerocli.pintest:main
[gpiozero_mock_pin_classes]
mockchargingpin = gpiozero.pins.mock:MockChargingPin
mockpin = gpiozero.pins.mock:MockPin
mockpwmpin = gpiozero.pins.mock:MockPWMPin
mocktriggerpin = gpiozero.pins.mock:MockTriggerPin
[gpiozero_pin_factories]
lgpio = gpiozero.pins.lgpio:LGPIOFactory
mock = gpiozero.pins.mock:MockFactory
native = gpiozero.pins.native:NativeFactory
pigpio = gpiozero.pins.pigpio:PiGPIOFactory
rpigpio = gpiozero.pins.rpigpio:RPiGPIOFactory

View File

@@ -0,0 +1,2 @@
gpiozero
gpiozerocli