Registry / devops / pigpio

pigpio

JSON →
library1.78pypypi✓ verified 83d ago

pigpio is a Python module for controlling the Raspberry Pi's GPIO pins. It provides both local and remote GPIO control via the pigpio daemon. Current version is 1.78, with infrequent releases.

pip install pigpio
INSTALL
IMPORT
SIG · PIGPIO
P
pigpio
devopspythonv1.78
Install
1.5s avg
Import
16ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.78 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.016s · 18.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.016s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pi
import pigpio pi = pigpio.pi()
import pigpio pi = pigpio.pi('localhost')
Host parameter is deprecated; omit or use host='' for local

Blink an LED on GPIO 17. Requires pigpio daemon (sudo pigpiod) to be running.

import pigpio import time pi = pigpio.pi() if not pi.connected: print("Failed to connect to pigpio daemon") exit(1) pi.set_mode(17, pigpio.OUTPUT) pi.write(17, 1) time.sleep(1) pi.write(17, 0) pi.stop()
Debug
Known issues
gotchapigpio requires the pigpio daemon to be running before the Python script can connect. If daemon is not running, pi.connected returns False.
fix
Start the daemon: sudo pigpiod
affects: all
deprecatedPassing a hostname to pigpio.pi() or using pi.serial() may be deprecated in future versions. Use pi = pigpio.pi() for local connection.
fix
Use pigpio.pi() without arguments for local connection.
affects: >=1.78
gotchaGPIO numbers are Broadcom (BCM) pin numbers, not physical pin numbers. Common mistake is to use physical pin numbers.
fix
Always use BCM GPIO numbers (e.g., GPIO 17 is physical pin 11).
affects: all
Errors
Common errors & fixes
Can't connect to pigpio on localhost
pigpio daemon not running or not accessible.
fix
Run 'sudo pigpiod' to start the daemon.
ImportError: No module named pigpio
pigpio Python module not installed.
fix
pip install pigpio
AttributeError: module 'pigpio' has no attribute 'pi'
Using an older version of pigpio that uses a different API.
fix
Upgrade to latest pigpio: pip install --upgrade pigpio
Upgrade
Version history
1.78latest on PyPI · released Sep 29, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
pigpio — pip install pigpio · libregistry