Skip to main content

Sleep Guard

Other tools such as Caffeine for Linux and Caffeinate for the Mac will keep your system awake, but require explicit action by the user. If you are like me, I often start a long running process, but forget to actually take the explicit action and come back to a sleeping system with no work done.

sleepguard is a program that monitors several system resources and prevents the computer from sleeping automatically if it detects significant activity (as defined by the user).

Installation

pip install sleepguard

To enable GPU monitoring you must install one (or both) of the optional variants: amd for AMD or nvidia for NVIDIA cards.

pip install sleepguard[amd,nvidia]

Basic Usage

The main application is implemented in the sleepguard.guard module and can be run like any other python application. This will start an infinite loop that periodically polls the desired system resources and will prevent the system from sleeping [1] if any of the values are above their configured thresholds.

python -m sleepguard.gaurd

Full Documentation

See read the docs for the full documentation and configuration options.

Metadata

Release files for sleepguard 0.1.7

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

Source distribution (sdist)

Source distribution for sleepguard 0.1.7
File Size Uploaded Provenance Actions
sleepguard-0.1.7.tar.gz 24.8 kB Without provenance Details for sleepguard-0.1.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sleepguard 0.1.7
File Interpreter ABI Platform Actions
sleepguard-0.1.7-py3-none-any.whl Python 3 none any Details for sleepguard-0.1.7-py3-none-any.whl

Total release size: 41.3 kB

Release files / sleepguard-0.1.7.tar.gz

Download URL sleepguard-0.1.7.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0d3e390ed54b5f5f51c1b65b4d4abeb4d8cc2acf8764269dbf5021d996e74422
BLAKE2b-256 checksum
How to use checksums
b01ee0416bfff743a25569c0e80b4e4a637c37b2377ed51132014507e4555a38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / sleepguard-0.1.7-py3-none-any.whl

Download URL sleepguard-0.1.7-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b842c2b4e92fb63f87e061d4114f0f75d96715c754efcc912e4bcd25a91293a2
BLAKE2b-256 checksum
How to use checksums
0d987d79f237796138bd3a853766d327444098b0afa8d5a582cca84ddc575214
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for sleepguard 0.1.7

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.

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