Appnope is a small Python library for macOS (10.9 and later) that disables App Nap for the current process. It is primarily used in long-running Python applications and interactive environments like Jupyter notebooks to prevent them from being suspended when in the background. The current version is 0.1.4, and the library is in maintenance, receiving updates mainly for compatibility.
pip install appnopeVerified import paths — ran on the pinned version, not inferred.
The simplest way to use appnope is to import it. This will automatically disable App Nap for the current Python process on supported macOS versions. For more granular control, `set_appnap_enabled()` can be used.
Ensure your environment is macOS (version 10.9 or later) when using appnope. It's advisable to guard its import with platform checks if your code needs to run on multiple OSes (e.g., `if sys.platform == 'darwin': import appnope`).
Be aware of the target macOS version. The library's utility is limited to macOS 10.9+.
If child processes also need App Nap disabled, you must import `appnope` within those child processes' entry points or apply equivalent OS-level settings.
Simply placing `import appnope` at the beginning of your script or interactive session is sufficient to disable App Nap for that process.
Install the module using pip: 'pip install appnope'.
Ensure the module is installed with 'pip install appnope' and that the correct Python environment is active.
Reinstall the module using 'pip install --force-reinstall appnope'.
Guard the import and usage of `appnope` with a platform check: `import sys; if sys.platform == 'darwin': import appnope`. Ensure the target macOS version is 10.9 or newer.
Disable 'appnope' within the IPython kernel configuration by adding `c.Kernel._darwin_app_nap = False` to your `~/.ipython/profile_default/ipython_kernel_config.py` file.
No dependency data recorded yet.