Linux sysfs gpio access
This library provides gpio access via the standard linux sysfs interface
It is intended to mimic RPIO as much as possible for all features, while also supporting additional (and better named) functionality to the same methods.
Supported Features
- get pin values with
read(pin)orinput(pin) - set pin values with
write(pin, value),set(pin, value)oroutput(pin, value) - get the pin mode with
mode(pin) - set the pin mode with
setup(pin, mode)modecan currently equalgpio.INorgpio.OUT
- create a
GPIOPinclass directly towriteandreada pin
Examples
RPi.GPIO Drop-in
Good for up to 130KHz pin toggle on a Pi 400.
import time
import gpio as GPIO
GPIO.setup(14, GPIO.OUT)
while True:
GPIO.output(14, GPIO.HIGH)
time.sleep(1.0)
GPIO.output(14, GPIO.LOW)
time.sleep(1.0)
Use GPIOPin directly
Good for up to 160KHz pin toggle on a Pi 400.
This gives you a class instance you can manipulate directly, eliminating the lookup:
import gpio
pin = gpio.GPIOPin(14, gpio.OUT)
while True:
pin.write(14, GPIO.HIGH)
time.sleep(1.0)
pin.write(14, GPIO.LOW)
time.sleep(1.0)
Metadata
Release files for gpio 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gpio-1.0.1.tar.gz | 5.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gpio-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.6 kB
Release files / gpio-1.0.1.tar.gz
| Download URL | gpio-1.0.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2deb1dcd8be1b11e61ffe8701cbb32f3a354902467f16a55fd2d7724e5a3d631
|
|
BLAKE2b-256 checksum How to use checksums |
c0211655623a323191d7c01ee05ac23b75ad98ed8e2b889eba6febd166ca2cb2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / gpio-1.0.1-py3-none-any.whl
| Download URL | gpio-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56e75e24d569048add247085936fc8f8c12324265d78b21293f9fa7e9c199610
|
|
BLAKE2b-256 checksum How to use checksums |
6a7e9d81b4012363b68ee88aeff04f8c44cc9dc1c1d307356eb06cf3b745a826
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Security for gpio 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.