wakepy


Namewakepy JSON
Version 0.10.1 PyPI version JSON
download
home_pageNone
Summarywakelock / keep-awake / stay-awake
upload_time2024-09-20 14:58:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.7
licenseMIT License Copyright (c) 2021-2024 Niko FΓΆhr Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/fohrloop/wakepy) ![PyPI](https://img.shields.io/pypi/v/wakepy) ![PyPI - Downloads](https://img.shields.io/pypi/dm/wakepy) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) ![mypy](https://img.shields.io/badge/mypy-checked-blue) ![mypy](https://img.shields.io/badge/code_style-black-black) ![coverage](https://img.shields.io/badge/coverage-100%25-32bb13)
[![pyversions](https://img.shields.io/pypi/pyversions/wakepy.svg)](https://pypi.python.org/pypi/wakepy) ![License](https://img.shields.io/github/license/fohrloop/wakepy)

![](./docs/source/img/wakepy-banner.svg)

Cross-platform wakelock / keep-awake / stay-awake written in Python.

<!-- wakepy readme beginning -->
## What is wakepy?

Wakepy is a package with an Python API and a CLI tool for *keeping a system awake*. It has two main modes:

βŒ› **Keeping CPU awake**:  For long running tasks. Inhibit the automatic, timer based sleep or suspend action, but allow screenlock and screensaver turning on and monitor turning off. *E.g.* for training machine learning models, video encoding and web scraping. (See: <a href="https://wakepy.readthedocs.io/stable/modes.html#keep-running-mode"><b><code>keep.running</code></b></a>)

πŸ–₯️ **Keeping screen awake**:  For long running tasks which require also the screen on and screenlock and screensaver inhibited.  *E.g.* for showing a video and dashboard / monitoring apps. (See: <a href="https://wakepy.readthedocs.io/stable/modes.html#keep-presenting-mode"><b><code>keep.presenting</code></b></a>)

## Supported runtime environments

Wakepy may keep the following systems awake. βŒ›: <a href="https://wakepy.readthedocs.io/stable/modes.html#keep-running-mode">keep.running</a> mode, πŸ–₯️:<a href="https://wakepy.readthedocs.io/stable/modes.html#keep-presenting-mode">keep.presenting</a> mode.


<table class="wakepy-table">
  <colgroup>
    <col style="width: 31%;">
    <col style="width: 55%;">
    <col style="width: 14%;">
  </colgroup>
  <thead>
    <tr>
      <th>Runtime environment</th>
      <th>Methods</th>
      <th>Modes</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Windows<sup>[1]</sup></td>
      <td><a href="https://wakepy.readthedocs.io/stable/methods-reference.html#setthreadexecutionstate">SetThreadExecutionState</a></td>
      <td>βŒ› πŸ–₯️</td>
    </tr>
    <tr>
      <td>macOS<sup>[2]</sup></td>
      <td><a href="https://wakepy.readthedocs.io/stable/methods-reference.html#macos-caffeinate">caffeinate</a></td>
      <td>βŒ› πŸ–₯️</td>
    </tr>
    <tr>
      <td>Unix + <a href="https://en.wikipedia.org/wiki/GNOME">GNOME</a><sup>[3]</sup></td>
      <td><a href="https://wakepy.readthedocs.io/stable/methods-reference.html#org-gnome-sessionmanager">org.gnome.SessionManager</a><br>
      <a href="https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-screensaver">org.freedesktop.ScreenSaver</a></td>
      <td>βŒ› πŸ–₯️</td>
    </tr>
    <tr>
      <td>Unix + <a href="https://en.wikipedia.org/wiki/KDE_Plasma">KDE Plasma</a><sup>[4]</sup></td>
      <td><a href="https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-powermanagement">org.freedesktop.PowerManagement</a><br>
      <a href="https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-screensaver">org.freedesktop.ScreenSaver</a></td>
      <td>βŒ› πŸ–₯️</td>
    </tr>
    <tr>
      <td>Unix + <a href="https://en.wikipedia.org/wiki/Freedesktop.org">Freedesktop.org</a> DE<sup>[5]</sup></td>
      <td>
      <a href="https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-powermanagement">org.freedesktop.PowerManagement</a><br>
      <a href="https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-screensaver">org.freedesktop.ScreenSaver</a>
      </td>
      <td>βŒ› πŸ–₯️</td>
    </tr>
  </tbody>
</table>

Unix above refers to any Unix-like systems which might use such DEs, e.g. Linux or FreeBSD. See also: [Wakepy roadmap](#wakepy-roadmap).

## Installing

Wakepy supports CPython 3.7 to 3.13 and PyPy 3.8 to 3.10, and may be installed from [PyPI](https://pypi.org/project/wakepy/) with

```
pip install wakepy
```

Wakepy can also be installed from conda-forge with
```
conda install wakepy
```
For more details and install options, see: [Installing documentation](https://wakepy.readthedocs.io/stable/installing.html).

<!-- wakepy readme at install before note -->
> [!NOTE]
> To get the `wakepy` <a href="https://wakepy.readthedocs.io/stable/cli-api.html">CLI command</a> working, you might need to restart the shell / terminal application.
<!-- wakepy readme at install after note -->

## Why wakepy?
Here's some reasons why you might want to consider using wakepy:


<dl>
  <dt>πŸ™…πŸΌβ€β™‚οΈ Non-disruptive methods βœ…</dt>
  <dd>No mouse wiggling or pressing random keys like F15. Wakepy is completely non-disruptive. It uses the APIs and programs the system provides for keeping a system awake.</dd>
  <dt>πŸ›‘οΈ Safe to crash πŸ’₯</dt>
  <dd>No changing of any system settings; killing the process abruptly will not leave the keepawake on, and will not require any manual clean-up.</dd>
  <dt>🚨 For security reasons πŸ”’</dt>
  <dd>With <a href="https://wakepy.readthedocs.io/stable/modes.html#keep-running-mode"><b><code>keep.running</code></b></a> mode you can disable <i>just</i> the automatic suspend and keep the automatic screen lock untouched.</dd>
  <dt>🌐 You need a cross-platform solution 🦸</dt>
  <dd>Same code works on Windows, macOS and Linux on multiple different Desktop Environments.</dd>
  <dt>πŸ’ͺ You want to have more control βš™οΈ</dt>
  <dd>It is possible to whitelist or blacklist the used wakepy Methods. It is also possible to prioritize them and define a on-fail action in case activating a wakepy mode fails.</dd>
  <dt>βœ‚οΈ You want to keep the amount of dependencies low πŸ“¦</dt>
  <dd>If you're running wakepy on Linux,  <a href="https://jeepney.readthedocs.io/">jeepney</A> (a dependecy free package) is required for D-Bus based methods. On Python 3.7,  <a href="https://pypi.org/project/typing-extensions/">typing-extensions</a> is needed for typing. Otherwise: wakepy has no python dependencies.</dd>
  <dt>βš–οΈ Package needs to have a permissive licence βœ”οΈ</dt>
  <dd>Wakepy is licenced under permissive <a href="https://github.com/fohrloop/wakepy/blob/main/LICENSE.txt">MIT License</a>.</dd>
</dl>


## Command line interface (CLI)

To keep system from sleeping, run

```
wakepy
```

For presentation mode, add `-p` flag. See also: <a href="https://wakepy.readthedocs.io/stable/cli-api.html">CLI API</a>.

## Basic usage within Python

In the simplest case, keeping a system running long running task with wakepy would be in python (See: <a href="https://wakepy.readthedocs.io/stable/modes.html#keep-running-mode">keep.running</a>):


```python
from wakepy import keep

with keep.running():
    # Do something that takes a long time. The system may start screensaver
    # / screenlock or blank the screen, but CPU will keep running.
```

If you want to *also* prevent screen lock and screen blank, use the <a href="https://wakepy.readthedocs.io/stable/modes.html#keep-presenting-mode">keep.presenting</a> mode:

```python
from wakepy import keep

with keep.presenting():
    # Do something that takes a long time and requires the screen to be awake
```
<!-- wakepy readme basic usage before tip -->

> [!TIP]
> See the [User Guide](https://wakepy.readthedocs.io/stable/user-guide.html) and the available wakepy [Modes](https://wakepy.readthedocs.io/stable/modes.html) and [Methods](https://wakepy.readthedocs.io/stable/methods-reference.html)

> [!NOTE]
> Wakepy API is still experimental 🚧
> 
> Since wakepy is still 0.x.x, the API might change without further notice from
> one release to another. After that, breaking changes should occur only part of
> a major release (e.g. 1.x.x -> 2.0.0).

<!-- wakepy readme where used -->
## Where wakepy is used?

- [aTrain](https://github.com/JuergenFleiss/aTrain) β€” transcription of speech recordings utilizing machine learning models.
- [mpc-autofill](https://github.com/chilli-axe/mpc-autofill) β€” Automating MakePlayingCards' online ordering system
- [LiveboxMonitor](https://github.com/p-dor/LiveboxMonitor) β€” Graphical user interface for routers (French project)
- [FOLON-FO4Downgrader](https://github.com/Fallout-London/FOLON-FO4Downgrader) β€” Tool for reverting to a previous version of a game (Fallout 4)
- [BD_to_AVP](https://github.com/cbusillo/BD_to_AVP) β€” 3D Blu-ray to Apple Vision Pro converter
- [davlee1972/upscale_video](https://github.com/davlee1972/upscale_video) β€” Upscaling video using AI
- [minarca](https://github.com/ikus060/minarca) β€” Cross-platform data backup software
- [OceanOptics/Inlinino](https://github.com/OceanOptics/Inlinino) β€” Data logger for oceanography
- [cogent3/EnsemblLite](https://github.com/cogent3/EnsemblLite) β€”  Obtaining dumps of Ensembl MySQL databases
- [lakeshore](https://github.com/lakeshorecryotronics/python-driver) β€” Lake Shore instruments python Driver
- [UCSD-E4E/baboon-tracking](https://github.com/UCSD-E4E/baboon-tracking) β€” In pipelines of a Computer Vision project tracking baboons
- [pysimai](https://github.com/ansys/pysimai) β€” A Python wrapper for Ansys SimAI
- [viskillz-blender](https://www.sciencedirect.com/science/article/pii/S2352711023000249) β€” Generating assets of Mental Cutting Test exercises


## Links


- πŸ–€ GitHub: [github.com/fohrloop/wakepy](https://github.com/fohrloop/wakepy)
- 🐍 PyPI: [pypi.org/project/wakepy](https://pypi.org/project/wakepy/)
- πŸ“– Documentation: [wakepy.readthedocs.io/stable](https://wakepy.readthedocs.io/stable)
- πŸ“ Changelog: [wakepy.readthedocs.io/stable/changelog.html](https://wakepy.readthedocs.io/stable/changelog.html)


## Wakepy roadmap

Wakepy vision is to support *any*<sup>†</sup> environment which runs Python. The following runtime environments will get support in the future<sup>†</sup>. Please vote or comment on the issue to raise them towards top of priorities. I'm also happy to receive PRs or comments explaining how it could be implemented.

<sup>†</sup>: if technically possible.

<table class="wakepy-table">
  <colgroup>
    <col style="width: 50%;">
    <col style="width: 50%;">
  </colgroup>
  <thead>
    <tr>
      <th>Runtime environment</th>
      <th>Issue</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>WSL</td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/36">wakepy/#36</a></td>
    </tr>
    <tr>
      <td>cygwin</td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/363">wakepy/#363</a></td>
    </tr>
    <tr>
      <td>Unix + <a href="https://en.wikipedia.org/wiki/Cinnamon_(desktop_environment)">Cinnamon</a></td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/312">wakepy/#312</a></td>
    </tr>
    <tr>
      <td>Unix + <a href="https://en.wikipedia.org/wiki/Xfce">Xfce</a></td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/311">wakepy/#311</a></td>
    </tr>
    <tr>
      <td>Unix + <a href="https://en.wikipedia.org/wiki/MATE_(desktop_environment)">Mate</a></td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/314">wakepy/#314</a></td>
    </tr>
    <tr>
      <td>Unix + <a href="https://en.wikipedia.org/wiki/LXQt">LXQt</a></td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/313">wakepy/#313</a></td>
    </tr>
    <tr>
      <td>Unix + <a href="https://en.wikipedia.org/wiki/Systemd">systemd</a></td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/335">wakepy/#335</a></td>
    </tr>
    <tr>
      <td>ChromeOS</td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/364">wakepy/#364</a></td>
    </tr>
    <tr>
      <td>Android</td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/358">wakepy/#358</a></td>
    </tr>
    <tr>
      <td>Jupyter Notebook (hosted on eg. Google Colab)</td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/195">wakepy/#195</a></td>
    </tr>
    <tr>
      <td>Browser (Pyodide, PyPy.js, Brython, Transcrypt, Skulpt)</td>
      <td><a href="https://github.com/fohrloop/wakepy/issues/362">wakepy/#362</a></td>
    </tr>
  </tbody>
</table>

If you have ideas or comments, please post yours on [wakepy/#317](https://github.com/fohrloop/wakepy/discussions/317).

## Licenses

The contents of this repository are licensed with [MIT License](https://github.com/fohrloop/wakepy/blob/main/LICENSE.txt), which is permissive and allows you to use the code as part of any application or library, commercial or not, with the following exception: The GitHub Invertocat logo used in the social share image is property of GitHub, downloaded from [github.com/logos](https://github.com/logos) and is used under the terms specified by GitHub.

---------------

## Footnotes

|                                                                                                                                             |
| ------------------------------------------------------------------------------------------------------------------------------------------- |
| <sup>[1]</sup> Windows XP or higher. Windows Server 2003 or higher.                                                                         |
| <sup>[2]</sup> Mac OS X 10.8 Mountain Lion (July 2012) or newer.                                                                            |
| <sup>[3]</sup> GNOME 2.24 (Sept 2008) onwards.                                                                                              |
| <sup>[4]</sup> KDE Plasma 5.12.90 (May 2018) onwards.                                                                                       |
| <sup>[5]</sup> Freedesktop.org compliant Desktop Environments on Unix-line (Linux/BSD) system which implements the listed D-Bus interfaces. |

<!-- wakepy readme after footnotes -->


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wakepy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Niko F\u00f6hr <fohrloop@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/29/0a/85ec8d2e40e30b1bbb2b5507e3db3232575460b501385203bc320f571559/wakepy-0.10.1.tar.gz",
    "platform": null,
    "description": "![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/fohrloop/wakepy)&nbsp;![PyPI](https://img.shields.io/pypi/v/wakepy)&nbsp;![PyPI - Downloads](https://img.shields.io/pypi/dm/wakepy)&nbsp;[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)&nbsp;![mypy](https://img.shields.io/badge/mypy-checked-blue)&nbsp;![mypy](https://img.shields.io/badge/code_style-black-black)&nbsp;![coverage](https://img.shields.io/badge/coverage-100%25-32bb13)\n[![pyversions](https://img.shields.io/pypi/pyversions/wakepy.svg)](https://pypi.python.org/pypi/wakepy)&nbsp;![License](https://img.shields.io/github/license/fohrloop/wakepy)\n\n![](./docs/source/img/wakepy-banner.svg)\n\nCross-platform wakelock / keep-awake / stay-awake written in Python.\n\n<!-- wakepy readme beginning -->\n## What is wakepy?\n\nWakepy is a package with an Python API and a CLI tool for *keeping a system awake*. It has two main modes:\n\n\u231b **Keeping CPU awake**:  For long running tasks. Inhibit the automatic, timer based sleep or suspend action, but allow screenlock and screensaver turning on and monitor turning off. *E.g.* for training machine learning models, video encoding and web scraping. (See: <a href=\"https://wakepy.readthedocs.io/stable/modes.html#keep-running-mode\"><b><code>keep.running</code></b></a>)\n\n\ud83d\udda5\ufe0f **Keeping screen awake**:  For long running tasks which require also the screen on and screenlock and screensaver inhibited.  *E.g.* for showing a video and dashboard / monitoring apps. (See: <a href=\"https://wakepy.readthedocs.io/stable/modes.html#keep-presenting-mode\"><b><code>keep.presenting</code></b></a>)\n\n## Supported runtime environments\n\nWakepy may keep the following systems awake. \u231b: <a href=\"https://wakepy.readthedocs.io/stable/modes.html#keep-running-mode\">keep.running</a> mode, \ud83d\udda5\ufe0f:<a href=\"https://wakepy.readthedocs.io/stable/modes.html#keep-presenting-mode\">keep.presenting</a> mode.\n\n\n<table class=\"wakepy-table\">\n  <colgroup>\n    <col style=\"width: 31%;\">\n    <col style=\"width: 55%;\">\n    <col style=\"width: 14%;\">\n  </colgroup>\n  <thead>\n    <tr>\n      <th>Runtime environment</th>\n      <th>Methods</th>\n      <th>Modes</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>Windows<sup>[1]</sup></td>\n      <td><a href=\"https://wakepy.readthedocs.io/stable/methods-reference.html#setthreadexecutionstate\">SetThreadExecutionState</a></td>\n      <td>\u231b \ud83d\udda5\ufe0f</td>\n    </tr>\n    <tr>\n      <td>macOS<sup>[2]</sup></td>\n      <td><a href=\"https://wakepy.readthedocs.io/stable/methods-reference.html#macos-caffeinate\">caffeinate</a></td>\n      <td>\u231b \ud83d\udda5\ufe0f</td>\n    </tr>\n    <tr>\n      <td>Unix + <a href=\"https://en.wikipedia.org/wiki/GNOME\">GNOME</a><sup>[3]</sup></td>\n      <td><a href=\"https://wakepy.readthedocs.io/stable/methods-reference.html#org-gnome-sessionmanager\">org.gnome.SessionManager</a><br>\n      <a href=\"https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-screensaver\">org.freedesktop.ScreenSaver</a></td>\n      <td>\u231b \ud83d\udda5\ufe0f</td>\n    </tr>\n    <tr>\n      <td>Unix + <a href=\"https://en.wikipedia.org/wiki/KDE_Plasma\">KDE Plasma</a><sup>[4]</sup></td>\n      <td><a href=\"https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-powermanagement\">org.freedesktop.PowerManagement</a><br>\n      <a href=\"https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-screensaver\">org.freedesktop.ScreenSaver</a></td>\n      <td>\u231b \ud83d\udda5\ufe0f</td>\n    </tr>\n    <tr>\n      <td>Unix + <a href=\"https://en.wikipedia.org/wiki/Freedesktop.org\">Freedesktop.org</a> DE<sup>[5]</sup></td>\n      <td>\n      <a href=\"https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-powermanagement\">org.freedesktop.PowerManagement</a><br>\n      <a href=\"https://wakepy.readthedocs.io/stable/methods-reference.html#org-freedesktop-screensaver\">org.freedesktop.ScreenSaver</a>\n      </td>\n      <td>\u231b \ud83d\udda5\ufe0f</td>\n    </tr>\n  </tbody>\n</table>\n\nUnix above refers to any Unix-like systems which might use such DEs, e.g. Linux or FreeBSD. See also: [Wakepy roadmap](#wakepy-roadmap).\n\n## Installing\n\nWakepy supports CPython 3.7 to 3.13 and PyPy 3.8 to 3.10, and may be installed from [PyPI](https://pypi.org/project/wakepy/) with\n\n```\npip install wakepy\n```\n\nWakepy can also be installed from conda-forge with\n```\nconda install wakepy\n```\nFor more details and install options, see: [Installing documentation](https://wakepy.readthedocs.io/stable/installing.html).\n\n<!-- wakepy readme at install before note -->\n> [!NOTE]\n> To get the `wakepy` <a href=\"https://wakepy.readthedocs.io/stable/cli-api.html\">CLI command</a> working, you might need to restart the shell / terminal application.\n<!-- wakepy readme at install after note -->\n\n## Why wakepy?\nHere's some reasons why you might want to consider using wakepy:\n\n\n<dl>\n  <dt>\ud83d\ude45\ud83c\udffc\u200d\u2642\ufe0f Non-disruptive methods \u2705</dt>\n  <dd>No mouse wiggling or pressing random keys like F15. Wakepy is completely non-disruptive. It uses the APIs and programs the system provides for keeping a system awake.</dd>\n  <dt>\ud83d\udee1\ufe0f Safe to crash \ud83d\udca5</dt>\n  <dd>No changing of any system settings; killing the process abruptly will not leave the keepawake on, and will not require any manual clean-up.</dd>\n  <dt>\ud83d\udea8 For security reasons \ud83d\udd12</dt>\n  <dd>With <a href=\"https://wakepy.readthedocs.io/stable/modes.html#keep-running-mode\"><b><code>keep.running</code></b></a> mode you can disable <i>just</i> the automatic suspend and keep the automatic screen lock untouched.</dd>\n  <dt>\ud83c\udf10 You need a cross-platform solution \ud83e\uddb8</dt>\n  <dd>Same code works on Windows, macOS and Linux on multiple different Desktop Environments.</dd>\n  <dt>\ud83d\udcaa You want to have more control \u2699\ufe0f</dt>\n  <dd>It is possible to whitelist or blacklist the used wakepy Methods. It is also possible to prioritize them and define a on-fail action in case activating a wakepy mode fails.</dd>\n  <dt>\u2702\ufe0f You want to keep the amount of dependencies low \ud83d\udce6</dt>\n  <dd>If you're running wakepy on Linux,  <a href=\"https://jeepney.readthedocs.io/\">jeepney</A> (a dependecy free package) is required for D-Bus based methods. On Python 3.7,  <a href=\"https://pypi.org/project/typing-extensions/\">typing-extensions</a> is needed for typing. Otherwise: wakepy has no python dependencies.</dd>\n  <dt>\u2696\ufe0f Package needs to have a permissive licence \u2714\ufe0f</dt>\n  <dd>Wakepy is licenced under permissive <a href=\"https://github.com/fohrloop/wakepy/blob/main/LICENSE.txt\">MIT License</a>.</dd>\n</dl>\n\n\n## Command line interface (CLI)\n\nTo keep system from sleeping, run\n\n```\nwakepy\n```\n\nFor presentation mode, add `-p` flag. See also: <a href=\"https://wakepy.readthedocs.io/stable/cli-api.html\">CLI API</a>.\n\n## Basic usage within Python\n\nIn the simplest case, keeping a system running long running task with wakepy would be in python (See: <a href=\"https://wakepy.readthedocs.io/stable/modes.html#keep-running-mode\">keep.running</a>):\n\n\n```python\nfrom wakepy import keep\n\nwith keep.running():\n    # Do something that takes a long time. The system may start screensaver\n    # / screenlock or blank the screen, but CPU will keep running.\n```\n\nIf you want to *also* prevent screen lock and screen blank, use the <a href=\"https://wakepy.readthedocs.io/stable/modes.html#keep-presenting-mode\">keep.presenting</a> mode:\n\n```python\nfrom wakepy import keep\n\nwith keep.presenting():\n    # Do something that takes a long time and requires the screen to be awake\n```\n<!-- wakepy readme basic usage before tip -->\n\n> [!TIP]\n> See the [User Guide](https://wakepy.readthedocs.io/stable/user-guide.html) and the available wakepy [Modes](https://wakepy.readthedocs.io/stable/modes.html) and [Methods](https://wakepy.readthedocs.io/stable/methods-reference.html)\n\n> [!NOTE]\n> Wakepy API is still experimental \ud83d\udea7\n> \n> Since wakepy is still 0.x.x, the API might change without further notice from\n> one release to another. After that, breaking changes should occur only part of\n> a major release (e.g. 1.x.x -> 2.0.0).\n\n<!-- wakepy readme where used -->\n## Where wakepy is used?\n\n- [aTrain](https://github.com/JuergenFleiss/aTrain) \u2014 transcription of speech recordings utilizing machine learning models.\n- [mpc-autofill](https://github.com/chilli-axe/mpc-autofill) \u2014 Automating MakePlayingCards' online ordering system\n- [LiveboxMonitor](https://github.com/p-dor/LiveboxMonitor) \u2014 Graphical user interface for routers (French project)\n- [FOLON-FO4Downgrader](https://github.com/Fallout-London/FOLON-FO4Downgrader) \u2014 Tool for reverting to a previous version of a game (Fallout 4)\n- [BD_to_AVP](https://github.com/cbusillo/BD_to_AVP) \u2014 3D Blu-ray to Apple Vision Pro converter\n- [davlee1972/upscale_video](https://github.com/davlee1972/upscale_video) \u2014 Upscaling video using AI\n- [minarca](https://github.com/ikus060/minarca) \u2014 Cross-platform data backup software\n- [OceanOptics/Inlinino](https://github.com/OceanOptics/Inlinino) \u2014 Data logger for oceanography\n- [cogent3/EnsemblLite](https://github.com/cogent3/EnsemblLite) \u2014  Obtaining dumps of Ensembl MySQL databases\n- [lakeshore](https://github.com/lakeshorecryotronics/python-driver) \u2014 Lake Shore instruments python Driver\n- [UCSD-E4E/baboon-tracking](https://github.com/UCSD-E4E/baboon-tracking) \u2014 In pipelines of a Computer Vision project tracking baboons\n- [pysimai](https://github.com/ansys/pysimai) \u2014 A Python wrapper for Ansys SimAI\n- [viskillz-blender](https://www.sciencedirect.com/science/article/pii/S2352711023000249) \u2014 Generating assets of Mental Cutting Test exercises\n\n\n## Links\n\n\n- \ud83d\udda4 GitHub: [github.com/fohrloop/wakepy](https://github.com/fohrloop/wakepy)\n- \ud83d\udc0d PyPI: [pypi.org/project/wakepy](https://pypi.org/project/wakepy/)\n- \ud83d\udcd6 Documentation: [wakepy.readthedocs.io/stable](https://wakepy.readthedocs.io/stable)\n- \ud83d\udcdd Changelog: [wakepy.readthedocs.io/stable/changelog.html](https://wakepy.readthedocs.io/stable/changelog.html)\n\n\n## Wakepy roadmap\n\nWakepy vision is to support *any*<sup>\u2020</sup> environment which runs Python. The following runtime environments will get support in the future<sup>\u2020</sup>. Please vote or comment on the issue to raise them towards top of priorities. I'm also happy to receive PRs or comments explaining how it could be implemented.\n\n<sup>\u2020</sup>: if technically possible.\n\n<table class=\"wakepy-table\">\n  <colgroup>\n    <col style=\"width: 50%;\">\n    <col style=\"width: 50%;\">\n  </colgroup>\n  <thead>\n    <tr>\n      <th>Runtime environment</th>\n      <th>Issue</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>WSL</td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/36\">wakepy/#36</a></td>\n    </tr>\n    <tr>\n      <td>cygwin</td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/363\">wakepy/#363</a></td>\n    </tr>\n    <tr>\n      <td>Unix + <a href=\"https://en.wikipedia.org/wiki/Cinnamon_(desktop_environment)\">Cinnamon</a></td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/312\">wakepy/#312</a></td>\n    </tr>\n    <tr>\n      <td>Unix + <a href=\"https://en.wikipedia.org/wiki/Xfce\">Xfce</a></td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/311\">wakepy/#311</a></td>\n    </tr>\n    <tr>\n      <td>Unix + <a href=\"https://en.wikipedia.org/wiki/MATE_(desktop_environment)\">Mate</a></td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/314\">wakepy/#314</a></td>\n    </tr>\n    <tr>\n      <td>Unix + <a href=\"https://en.wikipedia.org/wiki/LXQt\">LXQt</a></td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/313\">wakepy/#313</a></td>\n    </tr>\n    <tr>\n      <td>Unix + <a href=\"https://en.wikipedia.org/wiki/Systemd\">systemd</a></td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/335\">wakepy/#335</a></td>\n    </tr>\n    <tr>\n      <td>ChromeOS</td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/364\">wakepy/#364</a></td>\n    </tr>\n    <tr>\n      <td>Android</td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/358\">wakepy/#358</a></td>\n    </tr>\n    <tr>\n      <td>Jupyter Notebook (hosted on eg. Google Colab)</td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/195\">wakepy/#195</a></td>\n    </tr>\n    <tr>\n      <td>Browser (Pyodide, PyPy.js, Brython, Transcrypt, Skulpt)</td>\n      <td><a href=\"https://github.com/fohrloop/wakepy/issues/362\">wakepy/#362</a></td>\n    </tr>\n  </tbody>\n</table>\n\nIf you have ideas or comments, please post yours on [wakepy/#317](https://github.com/fohrloop/wakepy/discussions/317).\n\n## Licenses\n\nThe contents of this repository are licensed with [MIT License](https://github.com/fohrloop/wakepy/blob/main/LICENSE.txt), which is permissive and allows you to use the code as part of any application or library, commercial or not, with the following exception: The GitHub Invertocat logo used in the social share image is property of GitHub, downloaded from [github.com/logos](https://github.com/logos) and is used under the terms specified by GitHub.\n\n---------------\n\n## Footnotes\n\n|                                                                                                                                             |\n| ------------------------------------------------------------------------------------------------------------------------------------------- |\n| <sup>[1]</sup> Windows XP or higher. Windows Server 2003 or higher.                                                                         |\n| <sup>[2]</sup> Mac OS X 10.8 Mountain Lion (July 2012) or newer.                                                                            |\n| <sup>[3]</sup> GNOME 2.24 (Sept 2008) onwards.                                                                                              |\n| <sup>[4]</sup> KDE Plasma 5.12.90 (May 2018) onwards.                                                                                       |\n| <sup>[5]</sup> Freedesktop.org compliant Desktop Environments on Unix-line (Linux/BSD) system which implements the listed D-Bus interfaces. |\n\n<!-- wakepy readme after footnotes -->\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2021-2024 Niko F\u00f6hr  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "wakelock / keep-awake / stay-awake",
    "version": "0.10.1",
    "project_urls": {
        "Changelog": "https://wakepy.readthedocs.io/stable/changelog.html",
        "Documentation": "https://wakepy.readthedocs.io/",
        "Homepage": "https://github.com/fohrloop/wakepy",
        "Issue Tracker": "https://github.com/fohrloop/wakepy/issues",
        "Source Code": "https://github.com/fohrloop/wakepy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf3b4454c9d9ab52acef6dd23ed6e0498e7ecd5cfa081a8ac83271099fff91f1",
                "md5": "b25666ba224bfef0dbccbcde0bbb6417",
                "sha256": "a3c43e6b580759732bf96606ae015bfb98e528d5872a25a9bc8457bc70055fac"
            },
            "downloads": -1,
            "filename": "wakepy-0.10.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b25666ba224bfef0dbccbcde0bbb6417",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 56340,
            "upload_time": "2024-09-20T14:58:03",
            "upload_time_iso_8601": "2024-09-20T14:58:03.125021Z",
            "url": "https://files.pythonhosted.org/packages/bf/3b/4454c9d9ab52acef6dd23ed6e0498e7ecd5cfa081a8ac83271099fff91f1/wakepy-0.10.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "290a85ec8d2e40e30b1bbb2b5507e3db3232575460b501385203bc320f571559",
                "md5": "30697ca56dd6f821f73c428437600ca3",
                "sha256": "8c124e6bec03fd5afe8aff7a6c529d8ce90de976a82f0abc432fe30e5862838e"
            },
            "downloads": -1,
            "filename": "wakepy-0.10.1.tar.gz",
            "has_sig": false,
            "md5_digest": "30697ca56dd6f821f73c428437600ca3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 158287,
            "upload_time": "2024-09-20T14:58:04",
            "upload_time_iso_8601": "2024-09-20T14:58:04.793115Z",
            "url": "https://files.pythonhosted.org/packages/29/0a/85ec8d2e40e30b1bbb2b5507e3db3232575460b501385203bc320f571559/wakepy-0.10.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-20 14:58:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fohrloop",
    "github_project": "wakepy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "wakepy"
}
        
Elapsed time: 1.04863s