adrenaline
Simple Python module to prevent your computer from going to sleep. Supports Windows and macOS at the moment; Linux support is coming soon (hopefully).
Usage
The module provides a context manager named prevent_sleep(). The computer
will not go to sleep while the execution is in this context:
from adrenaline import prevent_sleep
with prevent_sleep():
# do something important here
...
Optionally, you can also prevent the screen from turning off:
with prevent_sleep(display=True):
# do something important here
...
Command line interface
You can also use this module from the command line as follows:
$ python -m adrenaline
The command line interface will prevent sleep mode as long as it is running.
Acknowledgments
Thanks to Michael Lynn for figuring out how to do this on macOS.
Thanks to Niko Pasanen for the Windows version.
Metadata
Release files for adrenaline 4.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| adrenaline-4.0.1.tar.gz | 5.6 kB | Without provenance | Details for adrenaline-4.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| adrenaline-4.0.1-py3-none-any.whl | Python 3 | none | any | Details for adrenaline-4.0.1-py3-none-any.whl |
Total release size: 14.2 kB
Release files / adrenaline-4.0.1.tar.gz
| Download URL | adrenaline-4.0.1.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bf0ddae21f77ac2d23463ad63e21ecb93e725c837030ca3d488a8bc21981727
|
|
BLAKE2b-256 checksum How to use checksums |
b4615ecb453599685e3738701e92b69746dbb0fd822a874e1a2487c136c6ea68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Release files / adrenaline-4.0.1-py3-none-any.whl
| Download URL | adrenaline-4.0.1-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
685ca576ad4d86881a60264da537afb6832c8a62c42bd3411513ba19820f2cb9
|
|
BLAKE2b-256 checksum How to use checksums |
7bb6e251fcff64ec55f95394889562ce9b155b73bbf90060e08494cd928b5789
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Security for adrenaline 4.0.1
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.