appnope
Disable App Nap on macOS >= 10.9
What it is and what it does
appnope is a lightweight utility for macOS developers who need to prevent the operating system from throttling their Python applications. On macOS >= 10.9, the App Nap feature automatically reduces CPU and I/O for backgrounded applications to save power, which can cause performance problems for long-running tasks. appnope wraps the native NSProcessInfo API using ctypes to temporarily disable App Nap around critical code sections.
The package provides three ways to control App Nap: a simple toggle function to disable it globally, a function to re-enable it, and a context manager for scoped disabling. It has no external dependencies and installs as a pure Python wheel, making it trivial to add to any macOS-based project that needs predictable performance during intensive operations.
Use it for:
- Prevent App Nap during long-running data processing or scientific computations on macOS.
- Ensure consistent performance for background services or daemons running on macOS systems.
- Disable App Nap around critical test suites or benchmarks to avoid timing interference.
- Protect specific code blocks from throttling while keeping App Nap enabled elsewhere in the application.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Disables App Nap on macOS >= 10.9 to prevent performance degradation during long-running operations, using ctypes to wrap NSProcessInfo system calls.
Yes, if you develop or run Python applications on macOS that perform long-running or performance-sensitive tasks. The package is actively maintained, has no dependencies, and solves a real macOS-specific problem. Not relevant for non-macOS environments.
Install
appnope on PyPI
pip
pip install appnopeuv
uv add appnopepoetry
poetry add appnopeInstalling appnope
Before you install
Low friction install with no runtime dependencies. Actively maintained as of 2026-08-03.
License in practice
BSD license is permissive; you can use this package freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install appnope
import appnope
appnope.nope() # disable App Nap
# or use as context manager
with appnope.nope_scope():
do_important_stuff()
macOS >= 10.9 required; package is macOS-only and will not function on other operating systems.
Verify before relying
- Whether App Nap behavior or system integration has changed in recent macOS versions beyond 10.9
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 920 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 9,808,896/month — #1,500 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: appnope-0.1.4-py2.py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pyobjc-framework-MediaAccessibilityProvides Python bindings for the macOS…
permissive · top 15,000 on PyPI
pyobjc-framework-MediaLibraryProvides Python bindings to macOS's…
permissive · top 15,000 on PyPI
dlinfoProvides Python access to libc's dlinfo…
permissive · top 5,000 on PyPI
setproctitleAllows a Python process to change its own title…
permissive · top 1,000 on PyPI
wakepyWakepy prevents a system from sleeping or…
permissive · top 15,000 on PyPI
timeout-decoratorA decorator that enforces time limits on…
permissive · top 5,000 on PyPI
pyobjc-framework-InstantMessageProvides Python bindings to the macOS…
permissive · top 15,000 on PyPI
readlineProvides GNU readline library support for…
copyleft · top 15,000 on PyPI
django-zen-queriesPrevents unintended database queries in Django…
permissive · top 15,000 on PyPI
gspread-asyncioProvides an asyncio wrapper around the gspread…
permissive · top 15,000 on PyPI