Registry / devops / wakepy

wakepy

JSON →
library1.0.0pypypi✓ verified 81d ago

wakepy is a cross-platform library for keeping the system awake (preventing sleep / screen lock) and releasing the wakelock. Version 1.0.0 (requires Python >=3.7). Development is active on GitHub. It supports Windows, macOS, and Linux via DBus.

pip install wakepy
INSTALL
IMPORT
SIG · WAKEPY
W
wakepy
devopspythonv1.0.0
Install
1.7s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.0 · 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.000s · 18.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

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

keep
from wakepy import keep
from wakepy import keepawake

Basic usage as a context manager to prevent sleep.

from wakepy import keepawake with keepawake(): # Your long-running task here import time time.sleep(10) print("System stayed awake during this block.")
wakepy --version
Debug
Known issues
gotchaOn Linux, wakepy requires D-Bus (typically via systemd or the freedesktop.org inhibitor interface). If DBus is not available, the context manager will raise an error or silently fail in older versions.
fix
Ensure dbus service is running; use 'pip install wakepy[dbus]' for additional dependencies if needed (though not needed in 1.0.0).
affects: <1.0.0
gotchakeepawake() may require superuser/administrator privileges on some Linux distributions to inhibit sleep. Without proper permissions, the inhibit may be ignored.
fix
Run Python with appropriate privileges or configure polkit rules for your user.
affects: all
breakingIn version 1.0.0, the API was simplified. The old import 'from wakepy import prevent_sleep' is removed. Use 'from wakepy import keepawake'.
fix
Replace 'prevent_sleep' with 'keepawake'.
affects: <1.0.0
Upgrade
Version history
1.0.0latest on PyPI · released Feb 7, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
16
Resources
wakepy — pip install wakepy · libregistry