Fake Raspberry PI GPIO drop-in replacement for RPi.GPIO
Project description
fake-rpigpio
fake-rpigpio
is a package intended to provide a lightweight (dependency-free) fake
interface for Raspberry Pi GPIO. The GPIO functions match those in the RPi.GPIO
library, however the functions do nothing. This makes it easier to test GPIO-related code
and to get the code to run on non-pi machines.
Installation
This package can be installed via pip:
pip install fake-rpigpio
Usage
A basic example of using this package to run with RPi.GPIO
on a Pi and fake-rpigpio
on
a non-Pi:
try:
import RPi.GPIO
except (RuntimeError, ModuleNotFoundError):
import fake_rpigpio.utils
fake_rpigpio.utils.install()
This will install fake-rpigpio.RPi
as RPi
and fake-rpigpio.RPi.GPIO
as RPi.GPIO
,
so you should not need to change imports for the RPi.GPIO
library.
Acknowledgements
The following projects inspired this one. While all are similar, the usage and dependency weight varies between projects.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fake_rpigpio-0.1.1.tar.gz
.
File metadata
- Download URL: fake_rpigpio-0.1.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd723b85b807e813a229f737bc0ac691bc4deb2fb9a0d2e97de99365dd18981a |
|
MD5 | 7e9935976a1f66bb6fdf6c8717e52672 |
|
BLAKE2b-256 | 5dcb4475d64953a0275b48f3db4a75e5dcc5f122fc65254d3814859177030954 |
File details
Details for the file fake_rpigpio-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: fake_rpigpio-0.1.1-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e5efc6c5982267380d19b3ecf652aeb3e97c8377d9b4d5dd950801a4b8b7863 |
|
MD5 | 087df6df8921f9bb5577fee4e0e996e0 |
|
BLAKE2b-256 | 577957280914374c89e87eb1862b0c42fdc87d668f2efc729c8b7831b7e97f4d |