{ "info": { "author": "Joel Rivera", "author_email": "rivera@joel.mx", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "Awake\r\n======\r\n*Command and library to \"wake on lan\" a remote host.*\r\n\r\nIf you want to know something more about the WoL stuff check \r\n`the wikipedia page`_.\r\n::\r\n\r\n Usage: awake [options] MAC1 [MAC2 MAC3 MAC...]\r\n\r\n Options:\r\n --version show program's version number and exit\r\n -h, --help show this help message and exit\r\n -p PORT, --port=PORT Destination port. (Default 9)\r\n -b BROADCAST, --broadcast=BROADCAST\r\n Broadcast ip of the network. (Default 255.255.255.255)\r\n -d DESTINATION, --destination=DESTINATION\r\n Destination ip/domain to connect and send the packet,\r\n by default use broadcast.\r\n -f FILE, --file=FILE Use a file with the list of macs, separated with -s,\r\n by default \\n. If any mac (line where -s \\n), have the\r\n \"#\" character, any following character is considered a\r\n comment. Can be used multiple times for multiple\r\n files.\r\n -s SEPARATOR, --separator=SEPARATOR\r\n Pattern to be use as a separator with the -f option.\r\n\t\t\t\t(Default \\n)\r\n -q, --quiet Do not output informative messages.\r\n\r\n\r\nRequirements\r\n-------------\r\n\r\nAny cpython (common python) implementation from 2.4 to 3.X.\r\n\r\nProbably it also works with jython, ironpython and pypy but I haven't\r\npersonally tested on those implementations.\r\n \r\n\r\nInstallation\r\n------------\r\n\r\n::\r\n\r\n pip install awake\r\n\r\n\r\nOr with the old `easy_install`\r\n\r\n::\r\n\r\n\r\n easy_install awake\r\n\r\nOr with the source\r\n\r\n::\r\n\r\n\r\n python setup.py install\r\n\r\n\r\n\r\nUpgrading from 0.X to 1.0\r\n--------------------------\r\n\r\nMake sure the previous CLI script `awake.py` gets removed from the script installation\r\npath after the upgrading, e.g. in linux `/usr/bin/` the new cli interface is\r\njust `awake` and if the file `awake.py` exists at the same level of the script \r\nthen the new `awake` going to try to fetch the required modules from the \r\nold cli script `awake.py`.\r\n\r\n\r\nCLI Examples\r\n------------\r\n\r\n**Wake-on-lan a group of computers in the current network**::\r\n\r\n awake 1c:6f:65:31:aa:5f 1c6c2531e051 3f.6c.25.31.e0.55 3b-6c-21-31-e0-41\r\n\r\nwhich is equivalent to::\r\n\r\n awake -f ~/list_of_macs\r\n\r\nand in the file ``list_of_macs`` have one MAC per line or use the ``-s`` option.\r\n\r\n``list_of_macs`` content::\r\n\r\n 1c:6f:65:31:aa:5f # web1\r\n 1c6c2531e051 # web2\r\n # The rest\r\n 3f.6c.25.31.e0.55\r\n 3b-6c-21-31-e0-41\r\n\r\nThe format of the MAC is flexible in the sense that can use any character to group\r\nthe digits of the MAC, except for the reserved character *#* for comments.\r\n\r\n\r\n**Wake-on-lan a computer or group of computers in a external network**\r\n\r\nFor this situation, you need to forward a port in your router, for example to\r\nforward 9999 to 9 in the local network o 7777 to 7, check the documentation if \r\nyour router or modem. After the port has been configured you can use `DDNS`_\r\nto have a reference to the current ip address of your router/modem and use awake\r\nin this way::\r\n\r\n awake -d myhouse.homedns.com -p 9999 -f ~/file_with_my_macs \r\n \r\nor use any other option, the important here is to use the ``-d`` and ``-p`` options \r\nto specify the destination to send the magic packet.\r\n\r\n**Alternative method to invoke awake**\r\n\r\nAwake can be used calling the module directly from python::\r\n\r\n python -m awake \r\n\r\nIs the same interface as the installed script ``awake``, this is very useful in\r\nplatforms like windows, when the `PythonXX/Scripts` is not set in the `PATH`.\r\n\r\n\r\nAs a library\r\n------------\r\n\r\nThe real functionality of the wake-on-lan is provided from a small function \r\nthat is implemented in the provided module ``awake.wol``::\r\n\r\n send_magic_packet(mac, broadcast='255.255.255.255', dest=None, port=9)\r\n Send a \"magic packet\" to the given destination mac to wake up \r\n the host, if `dest` is not specified then the packed is broadcasted.\r\n\r\n\r\nApart from the awake script the WOL functionality can be easily integrated\r\nin your python programs with a simple call to the function like::\r\n\r\n from awake import wol\r\n\r\n def sysadmin_function_x(mac, *args):\r\n # some stuff...\r\n wol.send_magic_packet(mac)\r\n # some more stuff...\r\n \r\n\r\nTests\r\n-----\r\n\r\nThe tests are designed to be executed with the python unittest module,\r\nyou can run the tests from the folder `test`::\r\n\r\n cd test\r\n python -m unittest discover \r\n\r\n\r\nIn case that you want to run the tests in python < 2.7, you will need the \r\n`unittest2`_ module.\r\n\r\nThe general recommended process to develop is using `virtualenv`_ and after creating the\r\nenviron just run::\r\n\r\n ./environ/bin/python setup.py install\r\n ./environ/bin/python -m unittest discover \r\n\r\n\r\n\r\nImprovements, bugs?\r\n-------------------\r\n\r\nFor any improvement or bug, feel free to create an `issue`_ in the github project.\r\n\r\n.. _the wikipedia page: http://en.wikipedia.org/wiki/Wake-on-LAN\r\n.. _DDNS: http://en.wikipedia.org/wiki/DDNS\r\n.. _issue: http://github.com/cyraxjoe/awake/issues\r\n.. _pypi: http://pypi.python.org/pypi/awake\r\n.. _unittest2: http://pypi.python.org/pypi/unittest2\r\n.. _virtualenv: http://pypi.python.org/pypi/virtualenv", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/cyraxjoe/awake/archive/v1.0.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/cyraxjoe/awake", "keywords": "", "license": "Copyright (C) 2012 Joel Juvenal Rivera Rivera rivera@joel.mx\r\n\r\nThis program is free software: you can redistribute it and/or modify\r\nit under the terms of the GNU General Public License version 3\r\nas published by the Free Software Foundation.\r\n\r\nThis program is distributed in the hope that it will be useful,\r\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\r\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\nGNU General Public License for more details.\r\n\r\nYou should have received a copy of the GNU General Public License\r\nalong with this program. If not, see .", "maintainer": "", "maintainer_email": "", "name": "awake", "package_url": "https://pypi.org/project/awake/", "platform": "linux2,win32,cygwin,darwin", "project_url": "https://pypi.org/project/awake/", "project_urls": { "Download": "https://github.com/cyraxjoe/awake/archive/v1.0.zip", "Homepage": "http://github.com/cyraxjoe/awake" }, "release_url": "https://pypi.org/project/awake/1.0/", "requires_dist": null, "requires_python": null, "summary": "Command and library to wake on lan a remote host.", "version": "1.0" }, "last_serial": 1230150, "releases": { "0.6": [ { "comment_text": "", "digests": { "md5": "14bfd7eee00db042f87ed99c9b61f72e", "sha256": "7fa4e0ff6a33c7adf13bf55084707f90123413ce1a5d01d224fa61050a75413b" }, "downloads": -1, "filename": "awake-0.6.tar.gz", "has_sig": false, "md5_digest": "14bfd7eee00db042f87ed99c9b61f72e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2431, "upload_time": "2011-05-15T22:19:23", "url": "https://files.pythonhosted.org/packages/4d/5f/3fb5ae32e5a10c363e19b9a11fd2483bca5ad4906961dacfb38699cb2bc1/awake-0.6.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "cd54eeb47aadb2b989db1eb28d409e4b", "sha256": "add9e3ec85284c53421f0ed71af2a318d3ae03a5b736f3fcc62b782a742f5c2c" }, "downloads": -1, "filename": "awake-0.6.1.tar.gz", "has_sig": false, "md5_digest": "cd54eeb47aadb2b989db1eb28d409e4b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2464, "upload_time": "2011-05-17T17:54:41", "url": "https://files.pythonhosted.org/packages/c0/ee/718966a61ff76564d4d3ea116d6d380c6f193b1075012ba2b42c4659d9a7/awake-0.6.1.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "d88bbc91f6956b9d29c08c0215770c39", "sha256": "349dc5195d563ec6ac401d982683b90fd2bfcf4c21da9648adb8b6f35e493b7d" }, "downloads": -1, "filename": "awake-0.7.tar.gz", "has_sig": false, "md5_digest": "d88bbc91f6956b9d29c08c0215770c39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2557, "upload_time": "2011-09-12T03:52:50", "url": "https://files.pythonhosted.org/packages/01/e0/6148d455ef77a62ae0be2f6a621c3cc4c418160b2703a56fb50ff8dfe149/awake-0.7.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "097ee453b4c91ba4530d627156b83f94", "sha256": "626b43457ef488dee86fae1ffa5adae68219249b64041b8e96087c065a89a540" }, "downloads": -1, "filename": "awake-0.7.1.tar.gz", "has_sig": false, "md5_digest": "097ee453b4c91ba4530d627156b83f94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4302, "upload_time": "2011-12-20T19:20:45", "url": "https://files.pythonhosted.org/packages/91/12/cb5010520b8ae1ca872694ba59c722e2d1079a03fec21b9d9864654b43f8/awake-0.7.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "57b7a2e616e37fc29b4011a2e1cc60b2", "sha256": "a4be9058c08ed702b700c9e10e270a7355ba1563f22ad6b2dbd334c6bb5a1730" }, "downloads": -1, "filename": "awake-1.0.tar.gz", "has_sig": false, "md5_digest": "57b7a2e616e37fc29b4011a2e1cc60b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11165, "upload_time": "2012-12-14T08:02:27", "url": "https://files.pythonhosted.org/packages/c9/48/337d1740355bca4c7876ca6a677e0c01f33455a86caaebef4ee472eb216a/awake-1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "6e89e67cb9e9df0d5d462b97290cffcd", "sha256": "5d9fd7b6da9627d20b1c86432362043d5191b3916b0552ba9621ea270fb4bfcf" }, "downloads": -1, "filename": "awake-1.0.win32.exe", "has_sig": false, "md5_digest": "6e89e67cb9e9df0d5d462b97290cffcd", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 209600, "upload_time": "2012-12-14T07:53:03", "url": "https://files.pythonhosted.org/packages/b8/19/27e6fb4e708a5e826feb207389363178c46735af3511a27be66526c25144/awake-1.0.win32.exe" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "57b7a2e616e37fc29b4011a2e1cc60b2", "sha256": "a4be9058c08ed702b700c9e10e270a7355ba1563f22ad6b2dbd334c6bb5a1730" }, "downloads": -1, "filename": "awake-1.0.tar.gz", "has_sig": false, "md5_digest": "57b7a2e616e37fc29b4011a2e1cc60b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11165, "upload_time": "2012-12-14T08:02:27", "url": "https://files.pythonhosted.org/packages/c9/48/337d1740355bca4c7876ca6a677e0c01f33455a86caaebef4ee472eb216a/awake-1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "6e89e67cb9e9df0d5d462b97290cffcd", "sha256": "5d9fd7b6da9627d20b1c86432362043d5191b3916b0552ba9621ea270fb4bfcf" }, "downloads": -1, "filename": "awake-1.0.win32.exe", "has_sig": false, "md5_digest": "6e89e67cb9e9df0d5d462b97290cffcd", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 209600, "upload_time": "2012-12-14T07:53:03", "url": "https://files.pythonhosted.org/packages/b8/19/27e6fb4e708a5e826feb207389363178c46735af3511a27be66526c25144/awake-1.0.win32.exe" } ] }