-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Another PR for #68 Docs ----- - Add nicer platform support table - Add ActivationWarning to docs - Update the docs front page - Add Tutorial page (on-fail action, which method was used) Other ----- - Add: ActivationWarning. Use that instead of general UserWarning if on-fail action is warning.
- Loading branch information
Showing
14 changed files
with
345 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Quickstart | ||
|
||
|
||
## Installing | ||
|
||
To install wakepy from PyPI, run | ||
|
||
```{code-block} text | ||
pip install wakepy | ||
``` | ||
|
||
## Basic Usage | ||
|
||
### Long running tasks | ||
|
||
If you want to keep a long task running, but do not want to prevent screen from locking and/or blanking, you can use the [`keep.running`](#keep-running-mode) function which returns a context manager: | ||
|
||
|
||
```{code-block} python | ||
from wakepy import keep | ||
with keep.running(): | ||
# Do something that takes a long time. The system may start screensaver | ||
# / screenlock, but CPU will keep running. | ||
``` | ||
|
||
|
||
### Keeping screen awake | ||
If you want to prevent screen lock and screen blank *in addition to* keeping CPU awake, use the [`keep.presenting`](#keep-presenting-mode) function which returns a context manager: | ||
|
||
|
||
```{code-block} python | ||
from wakepy import keep | ||
with keep.presenting(): | ||
# Do something that takes a long time and requires the screen to be awake | ||
``` | ||
|
||
|
||
|
||
```{admonition} Wakepy API is still experimental 🚧 | ||
:class: note | ||
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). | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.