/wakepy

Cross-platform keep-awake with python

Primary LanguagePythonMIT LicenseMIT

GitHub tag (latest by date) PyPI PyPI - Downloads GitHub

⏰😴 wakepy

Cross-platform wakelock written in Python.

  • It has a sans-IO core and zero required python dependencies
  • Can be used though the python API and the wakepy CLI.

Supports

  • Python: 3.7 to 3.12
  • OS: Windows, Linux and macOS

What it can do?

  • Prevent your system from going to sleep in the middle of a long running task (e.g. training machine learning models, video encoding, web scraping, ...)
  • Prevent starting a screensaver or screenlock automatically (showing a video, updating dashboard, monitoring apps, ...)

Used by

Documentation

⚖️👑 Key selling points

  • Wakepy supports multiple operating systems and desktop environments
  • Wakepy has permissive MIT licence
  • It has a simple command line interface and a python API
  • Wakepy has very zero required python dependencies
    • For using the D-Bus methods on Linux, one may use jeepney (optional)

Deprecation timeline (wakepy 0.7.0+)

Since deprecations may affect many users, they are communicated well before and time is given for project maintainers for migration. Timeline:

  • June 11th 2023: Release wakepy 0.7.0 with DeprecationWarnings for keepawake, set_keepawake and unset_keepawake, and the CLI option -s. Migration Guide published.
  • September 1st 2023 (or few days later): Release wakepy without the deprecated keepawake, set_keepawake and unset_keepawake; Only new API supported.