AwakeMate AwakeMate

🐍 Programming language runtime

Keep your Mac awake while Python runs

Model training, data pipelines and overnight scripts can run for hours with no keyboard touch. AwakeMate keeps your Mac awake for the whole run so it doesn't sleep halfway through and waste the work.

Download for macOS Buy AwakeMate

Free 14-day trial · one-time $39.99 · no telemetry · macOS 13+

When your Mac sleeps mid-Python

A Python job - a training loop, an ETL pipeline, a scraping run - can churn for hours without a single keypress. macOS counts that as inactivity and sleeps the machine, pausing or killing your script and throwing away everything since the last checkpoint. For an unattended run started before you walk away, you come back to a half-finished job and a sleeping Mac.

AwakeMate keeps it awake while Python runs

Python scripts almost never identify themselves by name. Whether launched as python, python3 or through a venv, they appear to macOS as the bare python process. AwakeMate watches for that, and its Deep CLI detection (on by default) reads the actual script underneath so your training run or pipeline is recognised rather than missed.

Detected process: python

Tip: leave "Sleep when tools go idle" off

For most Python work, leave "sleep when idle" OFF. Training loops, data jobs and scripts that wait on a network, a database or disk often look idle to the CPU even while they're hard at work, and idle-sleep could end the session during one of those lulls. Off means the Mac stays awake for the whole run. If you're running a purely CPU-bound burst that pegs a core and then exits - a heavy local compute - turning idle-sleep on lets the Mac sleep the instant it finishes.

Get the most out of it

More questions about Pythontap to expand

Will it keep my Mac awake during a long training run or data job?

Yes. With idle-sleep off, AwakeMate holds the Mac awake for the entire time python is running, so a multi-hour training loop or pipeline won't be paused by a sleep cycle.

I run my script as python3 inside a venv - will it be detected?

Yes. Those still run as the python process, and Deep CLI detection reads the real script name so the right job is recognised regardless of how it was launched.

Does AwakeMate send my code or data anywhere?

No. There's no telemetry. AwakeMate only reads short process names on-device to know what's running - never your script contents, arguments or data.

What's the best way to stop my Mac sleeping during a Python training run?

Let AwakeMate detect it for you. Add python to your watched tools and your Mac stays awake for the entire run, then sleeps once the job exits - no command to wrap and nothing to remember before you walk away. It works the same whether you launch as python, python3 or through a venv.

Is keeping my Mac awake without caffeinate actually better for a long Python job?

It's more convenient. caffeinate -i python train.py does the job with the same IOKit assertion, but it's manual - you must prefix every run, it keeps the whole machine awake until the script ends, and there's no idle-aware sleep or battery cutoff. AwakeMate ties the awake state to the python process itself, so it starts and stops on its own.

Can I leave a Python job running overnight on battery without draining the Mac flat?

Yes. AwakeMate keeps the Mac awake while python runs (lid open), but you can set a low-battery cutoff so it releases the assertion and lets the Mac sleep once the charge falls below your chosen level. That protects an unattended overnight run without leaving the machine awake at 2% till morning.

Will it keep my Mac awake for Python with the lid closed, even on battery?

Yes. Turn on "Keep awake with the lid closed" in Settings - Options and approve the one-time helper; AwakeMate then keeps the Mac awake with the lid shut while Python runs, and dims the built-in screen so it is not draining the battery under the lid. It works on most Apple Silicon Macs (Apple forces sleep on some, so close your lid once to confirm). It works on battery too, but real work drains it faster, so keep it on power for long runs. See how it works.

Keep your Mac awake - exactly when it should be.

Free 14-day trial. One-time $39.99, no subscription. macOS 13+.

Download for macOS Buy AwakeMate