• Stars
    star
    236
  • Rank 170,480 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created about 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A small python module for wake on lan.

wakeonlan

Pypi version Supported Python versions Build Status Documentation Status Code coverage

A small python module for wake on lan.

For more information on the wake on lan protocol please take a look at Wikipedia.

Installation

pip install wakeonlan

Usage

To wake up a computer using wake on lan it must first be enabled in the BIOS settings. Please note the computer you are trying to power on does not have an ip address, but it does have a mac address. The package needs to be sent as a broadcast package.

As a python module

Import the module

>>> from wakeonlan import send_magic_packet

Wake up a single computer by its mac address

>>> send_magic_packet('ff.ff.ff.ff.ff.ff')

Wake up multiple computers by their mac addresses.

>>> send_magic_packet('ff.ff.ff.ff.ff.ff',
...                   '00-00-00-00-00-00',
...                   'FFFFFFFFFFFF')

An external host may be specified. Do note that port forwarding on that host is required. The default ip address is 255.255.255.255 and the default port is 9.

>>> send_magic_packet('ff.ff.ff.ff.ff.ff',
...                   ip_address='example.com',
...                   port=1337)

A network adapter may be specified. The magic packet will be routed through this interface.

>>> send_magic_packet('ff.ff.ff.ff.ff.ff',
...                   interface='192.168.0.2')

As a standalone script

usage: wakeonlan [-h] [-i ip] [-p port] [-n interface] mac address [mac address ...]

Wake one or more computers using the wake on lan protocol.

positional arguments:
  mac address  The mac addresses of the computers you are trying to wake.

optional arguments:
  -h, --help   show this help message and exit
  -i ip        The ip address of the host to send the magic packet to. (default 255.255.255.255)
  -p port      The port of the host to send the magic packet to. (default 9)
  -n interface The ip address of the network adapter to route the magic packet through. (optional)

Dependencies

  • Python 3.x

License

MIT © Remco Haszing

More Repositories

1

monaco-yaml

YAML support for Monaco Editor
TypeScript
256
star
2

monaco-tailwindcss

Tailwindcss intellisense support in Monaco editor
TypeScript
79
star
3

remark-mdx-frontmatter

A remark plugin for converting frontmatter metadata into MDX exports
TypeScript
64
star
4

remark-mermaidjs

A remark plugin to render mermaid diagrams using playwright
HTML
52
star
5

remark-mdx-code-meta

A remark MDX plugin for using markdown code block metadata
JavaScript
46
star
6

rehype-mermaid

A rehype plugin to render mermaid diagrams
TypeScript
39
star
7

remark-mdx-images

A remark plugin for changing image sources to JavaScript imports using MDX
JavaScript
25
star
8

babel-plugin-transform-react-class-to-function

A Babel 7 plugin which transforms React component classes into functions
JavaScript
23
star
9

gatsby-remark-mermaid

Create mermaid graphs and diagrams in your markdown files.
JavaScript
23
star
10

estree-util-value-to-estree

Convert a JavaScript value to an estree expression
TypeScript
19
star
11

recma-nextjs-static-props

Expose top-level identifiers in Next.js app.js
JavaScript
18
star
12

monaco-unified

Get warnings and error messages in monaco editor based on a unified processor.
TypeScript
18
star
13

rehype-mdx-code-props

A rehype MDX plugin for interpreting markdown code meta as props
TypeScript
17
star
14

vscode-schemastore

Use the JSON Schema Store catalog for JSON schema validation.
JavaScript
17
star
15

mini-jsx

Create DOM elements using JSX
TypeScript
12
star
16

mermaid-isomorphic

Transform mermaid diagrams in the browser or Node.js
TypeScript
10
star
17

axios-test-instance

Test NodeJS backends using Axios
TypeScript
10
star
18

monaco-types

Type-only exports of Monaco editor
TypeScript
10
star
19

grunt-angular-templatecache

Grunt task to put AngularJS templates in the template cache.
JavaScript
9
star
20

rehype-mdx-title

A rehype MDX plugin for exposing the page title
JavaScript
8
star
21

remark-prettier

Check and format markdown or MDX using Prettier as a remark plugin
TypeScript
7
star
22

monaco-languageserver-types

Convert between language server types and Monaco editor types
TypeScript
7
star
23

zsh-node-bin

Add node_modules/.bin directories to your $PATH.
Shell
5
star
24

eslint-config

A strict ESLint configuration
JavaScript
4
star
25

recma-mdx-is-mdx-component

A recma plugin to define the isMdxComponent property on MDX components.
JavaScript
4
star
26

vscode-markdown-decorations

Provide a WYSIWYG-like experience for markdown and MDX files
TypeScript
4
star
27

playwright-monaco

Test Monaco editor integrations using Playwright
TypeScript
3
star
28

spellcard-creator

A spellcard generator for the Pathfinder Roleplaying Game.
JavaScript
3
star
29

monaco-worker-manager

Easily deal with monaco workers
TypeScript
3
star
30

unified-prettier

A unified plugin to format output using Prettier
JavaScript
3
star
31

python-audiolayer

This module provides a wrapper around the libav C library
C
3
star
32

flask-openapi

Generate a `swagger.json` handler from a Flask app
Python
3
star
33

remark-preset-remcohaszing

An opiniated remark preset
JavaScript
2
star
34

recma-export-filepath

A recma plugin to expose the filepath as a named export
JavaScript
2
star
35

dotfiles

My personal dotfiles
Vim Script
2
star
36

jest-axios-snapshot

Test axios HTTP responses using Jest snapshots
TypeScript
2
star
37

xast-namespaces

Attach namespace information to a xast XML element tree.
TypeScript
2
star
38

estree-util-module-to-function

Convert an estree module into a function body
TypeScript
2
star
39

rehype-mdx-import-media

An MDX rehype plugin for turning media paths into imports.
JavaScript
2
star
40

monaco-marker-data-provider

Provide Monaco marker data in a similar way as other integrations
TypeScript
1
star
41

generate-cordova-assets

Automatically generate assets for a Cordova based project.
JavaScript
1
star
42

python-syringe

A simple dependency injection library.
Python
1
star
43

unified-consistency

Report inconsistencies between the input and output of a unified pipeline
TypeScript
1
star
44

.github

Some global files that apply to all of my projects.
1
star
45

codeclimate-types

TypeScript type definitions for code climate reports
1
star
46

remcohaszing.github.io

My personal website
HTML
1
star
47

minecraft-hue

Connect Philips Hue to Minecraft
Java
1
star
48

calendar-generator

Generate a personalized Dutch week calendar for any given year
Python
1
star
49

codemirror-languageservice

Integrate an Language Server Protocol compatible language service into CodeMirror
TypeScript
1
star