Skip to main content

A Wake-on-LAN tool written in Python.

Project description


A Wake-on-LAN tool written in Python.

MIT license PyPI PyPI - Python Version PyPI - Wheel CircleCI branch Documentation Status

Pywol allows for starting up WoL-enabled systems over a network1, and can either be used as a CLI tool or imported for use in other Python code.


$ pip install pywol

Usage examples

As a CLI tool:

$ pywol 1A2B3C4D5E6F --v
Sent magic packet for '1A2B3C4D5E6F' to
$ pywol 1A:2B:3C:4D:5E:6F --v --ip
Sent magic packet for '1A:2B:3C:4D:5E:6F' to
$ pywol --help

  CLI for the Pywol package.

  Prefer to specify the IPv4 broadcast address of the target host's
  subnet over the default ''.

  To automatically resolve the broadcast address of a subnet,
  specify the target host's IPv4 address along with its netmask. E.g.
  '' or '' --> ''

  --ip_address, --ip TEXT  IPv4 broadcast address or host address with
                            netmask.  [default:]
  --port, --p INTEGER      Target port.  [default: 9]
  --verbose, --v
  --help                   Show this message and exit.

Imported for use in other code:

>>> from pywol import wake
>>> wake("1A2B3C4D5E6F", ip_address="")
>>> wake("1A-2B-3C-4D-5E-6F", ip_address="", return_dest=True)
('', '9')


Additional documentation is available at

Development setup

Clone repo:

$ git clone
$ cd pywol

Create and activate virtual environment on OS X & Linux:

$ python3 -m venv venv
$ source venv/bin/activate

Create and activate virtual environment on Windows:

> python -m venv venv
> venv\Scripts\activate

Install development requirements:

$ pip install -r dev_requirements.txt

Run test suite:

$ pytest -v

Why create another WoL tool?

I needed one and this was an opportunity to learn some stuff.


Erik R Berlin -

Distributed under the MIT license. See LICENSE for more information.

1. Provided that any routers between the client and target hosts are configured to forward broadcast packets.

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

pywol-1.0.0.tar.gz (4.6 kB view hashes)

Uploaded source

Built Distribution

pywol-1.0.0-py3-none-any.whl (6.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page