Python api docs

Small module for use with the wake on lan protocol.

wakeonlan.create_magic_packet(macaddress: str) → bytes

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 – the mac address that should be parsed into a magic packet.
wakeonlan.main(argv: List[str] = None) → None

Run wake on lan as a CLI application.

wakeonlan.send_magic_packet(*macs, ip_address: str = '', port: int = 9) → None

Wake up computers having any of the given mac addresses.

Wake on lan must be enabled on the host device.


macs – One or more macaddresses of machines to wake.

Keyword Arguments:
  • ip_address – the ip address of the host to send the magic packet to.
  • port – the port of the host to send the magic packet to.