#+TITLE: Type stubs for RPi.GPIO #+KEYWORDS: cyborg #+LANGUAGE: en [[https://sourceforge.net/projects/raspberry-gpio-python/][RPi.GPIO]] is a Python module for controlling GPIO pins on Raspberry Pi. It is old and little maintained (they still use sourceforge.net!), but still useful today. It doesn't have type hints, so [[https://github.com/python/typeshed/pull/11345][I added stubs for RPi.GPIO]], now [[https://pypi.org/project/types-RPi.GPIO/][available on PyPI]]. Incidentally I learned of [[https://peps.python.org/pep-0503/#normalized-names][distribution name normalisation]]. Package names can use ASCII letters, numbers, and =.=, =-= and =_=; but the normalised name is lower-cased with any run of punctuation characters replaced with a single dash, so rpi-gpio is the normal form for RPi.GPIO. =pip= the CLI tool and the PyPI web interface accept any form: =pip install RPi.GPIO=, or =pip install rpi-gpio=, or =pip install rPi__GpIo= will install the same package. =pip-compile= with use the normalized name when writing a constraints file.