GPIO Programming on the Raspberry Pi: Python Libraries

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

Our great sponsors
  • OPS - Build and Run Open Source Unikernels
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • GitHub repo WiringPi

    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.

  • GitHub repo WiringPi-Python

    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.

  • OPS

    OPS - Build and Run Open Source Unikernels. Quickly and easily build and deploy open source unikernels in tens of seconds. Deploy in any language to any cloud.

  • GitHub repo pigpio

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

    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.

  • GitHub repo 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 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