Skip to main content

Keep macOS (OSX) awake by setting power assertions

Project description


sleepless
=========

Python wrapper around the macOS (OSX) assertion for preventing standby "due to lack of user action".

Usage:
```python
import sleepless

# Tell OS to keep awake
sleepless.keep_awake("MyApp - why I don't sleep")

# Do stuff
do_lengthy_action()

# Calling again is harmless
sleepless.keep_awake("MyApp - why I don't sleep")

# When done
sleepless.allow_sleep()

```
(c) 2012 The SABnzbd Team <team@sabnzbd.org>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sleepless-1.0.1.tar.gz (2.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page