Remote computer awake (rawake)
Project description
Remote Computer Awake (rawake)
Installation
$ uv pip install -U rawake # install latest version
$ rawake --version # verify installation
Configuration
The rawake configuration is a python-base configuration file. Configuration should be stored at ~/.config/rawake/config.py
Example:
from rawake.config import Config, Computer
DEFAULT_SSH_SUSPEND_COMMAND = "sudo systemctl suspend"
CONFIGURATION = Config(
computers=[
Computer(
name="remote-server",
ip_address="192.168.0.10",
mac_address="22:1b:5c:44:12:6b",
ssh_port=2222,
ssh_suspend_command=DEFAULT_SSH_SUSPEND_COMMAND,
),
Computer(
name="other-server",
ip_address="192.168.0.200",
mac_address="a4:44:c3:61:10:b8",
ssh_suspend_command="sudo shutdown -h now",
),
],
)
Listing the configuration
$ rawake --list
[
{
"name": "other-server",
"mac_address": "a4:44:c3:61:10:b8",
"ip_address": "192.168.0.200",
"ss_suspend_command": "sudo shutdown -h now",
"ssh_port": 22
},
{
"name": "remote-server",
"mac_address": "22:1b:5c:44:12:6b",
"ip_address": "192.168.0.10",
"ss_suspend_command": "sudo systemctl suspend",
"ssh_port": 2222
}
]
Suspend remote computer:
rawake requires a username:password SSH connection to the remote host to be able to execute the configured suspend command.
$ rawake --suspend remote-server
SSH authentication:
username:username
password:<password>
Awake remote computer:
For awaking a remote computer, rawake sends a Wake-On-Lan magic packet.
rawake --awake remote-server
Development
Python dev environment:
-
Install uv.
-
Create virtual environment and install dependencies:
uv sync --all-extras
-
Activate the virtualenv:
source .venv/bin/activate
-
Install git pre-commit hooks
pre-commit installpre-commit autoupdate
Running the tests:
uv run pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rawake-0.2.1.tar.gz.
File metadata
- Download URL: rawake-0.2.1.tar.gz
- Upload date:
- Size: 67.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c19bb18c106c1f975d280c14044314ef2116ff6ae7f9d1b089321cb56565fab7
|
|
| MD5 |
e34a0640c6bc1c6e121df6538f98fae3
|
|
| BLAKE2b-256 |
427ce6c36acfc08c06c6850be9a25eec5b3637d2e283e7842bbb1428ca608a59
|
Provenance
The following attestation bundles were made for rawake-0.2.1.tar.gz:
Publisher:
release.yml on jfsanchez91/rawake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rawake-0.2.1.tar.gz -
Subject digest:
c19bb18c106c1f975d280c14044314ef2116ff6ae7f9d1b089321cb56565fab7 - Sigstore transparency entry: 747151839
- Sigstore integration time:
-
Permalink:
jfsanchez91/rawake@2d0cb225b3b3a43a3d234fce9a2e560b443f4553 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/jfsanchez91
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2d0cb225b3b3a43a3d234fce9a2e560b443f4553 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rawake-0.2.1-py3-none-any.whl.
File metadata
- Download URL: rawake-0.2.1-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a8ec3b31b6c0ae18ef7435ae499c145df0fd6a5f28d3a53bf00a8b4fd8bcb49
|
|
| MD5 |
da170d24c1c62cc749d635a6de061da6
|
|
| BLAKE2b-256 |
86662fb369acbe8be93f04f460e72137fe4490fbe0e5efb1c438466b562a8543
|
Provenance
The following attestation bundles were made for rawake-0.2.1-py3-none-any.whl:
Publisher:
release.yml on jfsanchez91/rawake
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rawake-0.2.1-py3-none-any.whl -
Subject digest:
4a8ec3b31b6c0ae18ef7435ae499c145df0fd6a5f28d3a53bf00a8b4fd8bcb49 - Sigstore transparency entry: 747151843
- Sigstore integration time:
-
Permalink:
jfsanchez91/rawake@2d0cb225b3b3a43a3d234fce9a2e560b443f4553 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/jfsanchez91
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2d0cb225b3b3a43a3d234fce9a2e560b443f4553 -
Trigger Event:
release
-
Statement type: