Python api docs

Small module for use with the wake on lan protocol.

wakeonlan.create_magic_packet(macaddress)

Create a magic packet.

A magic packet is a packet that can be used with the for wake on lan protocol to wake up a computer. The packet is constructed from the mac address given as a parameter.

Parameters:macaddress (str) – the mac address that should be parsed into a magic packet.
wakeonlan.main(argv=None)

Run wake on lan as a CLI application.

wakeonlan.send_magic_packet(*macs, **kwargs)

Wake up computers having any of the given mac addresses.

Wake on lan must be enabled on the host device.

Parameters:

macs (str) – One or more macaddresses of machines to wake.

Keyword Arguments:
 
  • ip_address (str) – the ip address of the host to send the magic packet to (default “255.255.255.255”)
  • port (int) – the port of the host to send the magic packet to (default 9)