rf24-py¶
The python binding for the rf24-rs project (written in rust).
This package is only functional on Linux machines. Although, installing this package in non-Linux environments will provide the typing information used on Linux.
See the docs for more detail about the API.
Install¶
To install from pypi.org:
pip install rf24-py
To build from source, the rf24-rs project uses uv to manage dependencies:
uv sync
Append --no-dev (or set UV_NO_DEV=1 environment variable) for environments with limited disk space (eg. Raspberry Pi machine).
As of uv v0.8.7, the environment variable
Examples¶
The examples are located in the repository's root path "examples/python". To run the examples, simply pass the example file's path to the python interpreter:
uv run examples/python/getting_started.py
Again, the --no-dev argument can be applied to the uv run command
(or set UV_NO_DEV=1 environment variable)
for environments with limited disk space.
The examples/python/irq_config.py script requires the gpiod package.
The uv run command needs to be amended to include this dependency:
uv run --with gpiod examples/python/irq_config.py