Skip to main content

Pi5 Fan Control

The Pi5 Fan Control library wraps functions to read and control the fan curve of a Raspberry Pi 5 from a Python script. The main method of doing this is through editing the firmware config.txt.

Prerequisites

You will need a fan, like the official case fan or the Active Cooler fan, plugged into the fan port on your Pi 5. In addition, you will need some form of sudo access on your Pi, as the library requires it in order to access the configuration files.

Installation

This library is available in PyPi. Simply install the library:

pip install pi5-fan-control

Getting Started

Example code files can be found under src/pi5_fancontrol/examples in the repository. In addition, unit tests for every function of the library can be found in the tests folder; read through these to get a comprehensive understanding of what the library can do. Features include:

  • Updating the fan curve (requires a reboot to take effect)
  • Reading the current fan curve config, if it exists
  • Getting the live fan speed and CPU temperature
  • Safety checks for bad configs, bad values

Getting Help

If you need any help with this library, or if you've found an issue, please feel free to open up a new issue in this repository or email me at shashankprasanna1@gmail.com.

If you're feeling up to the task, you can also update the code yourself and submit a pull request.

Metadata

Release files for pi5-fan-control 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pi5-fan-control 1.1.0
File Size Uploaded
pi5_fan_control-1.1.0.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pi5-fan-control 1.1.0
File Interpreter ABI Platform
pi5_fan_control-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.4 kB

Release files / pi5_fan_control-1.1.0.tar.gz

Download URL pi5_fan_control-1.1.0.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f3a0d1efe63141e740939e02ca20882a83c35efe216595c9b20918b361c6f8a8
BLAKE2b-256 checksum
How to use checksums
3ae96f69a6276a06b9a78600260e7c62f79286e7e52d6349724219210d9c1793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / pi5_fan_control-1.1.0-py3-none-any.whl

Download URL pi5_fan_control-1.1.0-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25cb33a5a6daa5b22b02fc5fca91828594550e08a471884ffd0edf85a282da41
BLAKE2b-256 checksum
How to use checksums
aa1277c550771c77a46885a6d0a45a4ff8ea183e81e269aba0b9852b6f7c07d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page