GPIO Programming on the Raspberry Pi: Python Libraries

This page summarizes the projects mentioned and recommended in the original post on dev.to

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • WiringPi

    Discontinued Gordon's Arduino wiring-like WiringPi Library for the Raspberry Pi (Unofficial Mirror for WiringPi bindings)

  • The WiringPi library is an often used, functional rich library that supports I2C and SPI connections. It is written in C and provides Python bindings. The library is unfortunately deprecated as the original author stated. Decide yourself if you want to use the library: On one hand, you find several examples on the internet, on the other hand, members from the Raspberry Pi community start to move to new libraries.

  • WiringPi-Python

    Discontinued Unofficial Python-wrapped version of Gordon Henderson's WiringPi version 2.

  • The libraries latest version can be accessed on Github: See the WiringPi C and WiringPi Python.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • pigpio

    pigpio is a C library for the Raspberry which allows control of the General Purpose Input Outputs (GPIO).

  • The pigpio is an actively developed library with an impressive set of features: All GPIO pins of the Raspberry Pi can be read, written to, attached to interrupt handlers, and output PWM signals at the same time. Also, UART, I2C and SPI protocols are implemented. It is written in C and also provides Python bindings. Go to the official Github repository and build the newest version on your Raspberry Pi, or install it with apt install pigpio python-pigpio python3-pigpio.

  • gpiozero

    A simple interface to GPIO devices with Raspberry Pi

  • Gpiozero is already installed in the current Raspberry Pi OS - if not, just run python3 -m pip gpiozero. The source code files can be accessed on Github. The official documentation on readthedocs.io provides rich information and plenty example code.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts