Registry / http-networking / wakeonlan

wakeonlan

JSON →
library3.3.0pypypi✓ verified 85d ago

A small Python module for Wake-on-LAN (WoL). Sends magic packets to wake up remote machines. Current version is 3.1.0, with irregular releases.

pip install wakeonlan
INSTALL
IMPORT
SIG · WAKEONLAN
W
wakeonlan
http-networkingpythonv3.3.0
Install
1.5s avg
Import
24ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.026s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.022s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

send_magic_packet
from wakeonlan import send_magic_packet
from wakeonlan.wakeonlan import send_magic_packet
No need to specify inner module; top-level import is sufficient.

Basic usage: import the library and call send_magic_packet with a MAC address.

from wakeonlan import send_magic_packet # Send WoL packet to a device with the given MAC address send_magic_packet('aa:bb:cc:dd:ee:ff') # You can also specify the IP address and port send_magic_packet('aa:bb:cc:dd:ee:ff', ip_address='192.168.1.255', port=9) # Works with IPv6 (requires wakeonlan >= 3.1.0) # send_magic_packet('aa:bb:cc:dd:ee:ff', ip_address='ff02::1')
wakeonlan --version
Debug
Known issues
breakingPython 3.6 support dropped in version 3.0.0.
fix
Upgrade to Python 3.7+.
affects: >=3.0.0
breakingPython 2 support dropped in version 2.0.0.
fix
Use Python 3.6+ (now 3.7+ for latest).
affects: >=2.0.0
gotchaBroadcast IP must allow UDP traffic on port 9 (or custom port). Firewalls may block it.
fix
Ensure UDP port 9 (or chosen port) is open and broadcast is allowed on your network.
affects: all
gotchaMAC address format: accepted delimiters are ':' and '-', also 'xxxx.xxxx.xxxx' format (supported since v3.0.0).
fix
Use standard colon-separated format for maximum compatibility: 'AA:BB:CC:DD:EE:FF'.
affects: >=3.0.0
Errors
Common errors & fixes
OSError: [Errno 13] Permission denied
Creating raw socket requires root/admin privileges on some systems.
fix
Run the script with sudo (Linux/Mac) or as Administrator (Windows). Alternatively, use the library's default UDP broadcast method (no raw socket typically needed).
AttributeError: module 'wakeonlan' has no attribute 'send_magic_packet'
Old version of wakeonlan (< 1.0.0?) or incorrect import path.
fix
Upgrade to latest version: pip install --upgrade wakeonlan. Import using: from wakeonlan import send_magic_packet
ValueError: invalid MAC address
MAC address uses invalid characters or wrong format.
fix
Use format like 'AA:BB:CC:DD:EE:FF' (colon-separated hexadecimal pairs).
Upgrade
Version history
3.3.0latest on PyPI · released May 25, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
17 hits · last 30 days
node
16
OpenAI (training)
1
Resources
wakeonlan — pip install wakeonlan · libregistry