# 💤 Hypnus
Hypnus is a small utility to turn off your computer if the [EDF Tempo](https://particulier.edf.fr/fr/accueil/gestion-contrat/options/tempo/details.html) day is red.
Hypnus is implemented using the python standard library exclusively (it does not require external dependencies to run) and is compatible with the following python versions:
- 3.8
- 3.9
- 3.10
- 3.11
- 3.12
## ⚙️ How does it work?
1. Queries the free [api-couleur-tempo.fr](https://www.api-couleur-tempo.fr) API to determine today's Tempo color.
2. If that color is red, it turns off the computer (provided the current user has enough permissions for it)
## 🏁 Getting started
Hypnus is a small utility that executes once, it purposefully does not implement any scheduling.
You can schedule the hypnus command to run every day at 6:00 AM (time at which the Tempo color changes).
You can install and run it multiple ways:
### 🐍 With `pip install`
```bash
pip install "hypnus==1.0.0"
hypnus
```
### 🐋 With `docker run`
*⚠️ Warning: running docker images with the `--privileged` flag is a security risk, I am currently exploring alternatives.*
```bash
docker run --rm --privileged ghcr.io/guillaumedsde/hypnus:1.0.0
```
## 🔮 Roadmap
- [x] Published Pypi package
- [x] Published multiarchitecture docker image
- [ ] Published static binary
## ⚖️ License
See the [`LICENSE`](LICENSE) file.
Raw data
{
"_id": null,
"home_page": "https://github.com/guillaumedsde/hypnus",
"name": "hypnus",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.13,>=3.8",
"maintainer_email": null,
"keywords": "shutdown, EDF, tempo",
"author": "guillaumedsde",
"author_email": "30023543+guillaumedsde@users.noreply.github.com",
"download_url": "https://files.pythonhosted.org/packages/b8/c7/889b25844942245bc9eba6a624251b90e005d8aaff4d8f09bf2850c79d2a/hypnus-1.0.0.tar.gz",
"platform": null,
"description": "# \ud83d\udca4 Hypnus\n\nHypnus is a small utility to turn off your computer if the [EDF Tempo](https://particulier.edf.fr/fr/accueil/gestion-contrat/options/tempo/details.html) day is red.\n\nHypnus is implemented using the python standard library exclusively (it does not require external dependencies to run) and is compatible with the following python versions:\n\n- 3.8\n- 3.9\n- 3.10\n- 3.11\n- 3.12\n\n## \u2699\ufe0f How does it work?\n\n1. Queries the free [api-couleur-tempo.fr](https://www.api-couleur-tempo.fr) API to determine today's Tempo color.\n2. If that color is red, it turns off the computer (provided the current user has enough permissions for it)\n\n## \ud83c\udfc1 Getting started\n\nHypnus is a small utility that executes once, it purposefully does not implement any scheduling.\n\nYou can schedule the hypnus command to run every day at 6:00 AM (time at which the Tempo color changes).\n\nYou can install and run it multiple ways:\n\n\n### \ud83d\udc0d With `pip install`\n\n```bash\npip install \"hypnus==1.0.0\"\nhypnus\n```\n\n### \ud83d\udc0b With `docker run`\n\n*\u26a0\ufe0f Warning: running docker images with the `--privileged` flag is a security risk, I am currently exploring alternatives.*\n\n```bash\ndocker run --rm --privileged ghcr.io/guillaumedsde/hypnus:1.0.0\n```\n\n## \ud83d\udd2e Roadmap\n\n- [x] Published Pypi package\n- [x] Published multiarchitecture docker image\n- [ ] Published static binary\n\n## \u2696\ufe0f License\n\nSee the [`LICENSE`](LICENSE) file.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Power off computer on EDF Tempo red days.",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/guillaumedsde/hypnus",
"Repository": "https://github.com/guillaumedsde/hypnus"
},
"split_keywords": [
"shutdown",
" edf",
" tempo"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d1fa7fa620e834884c8b0c57d8d292e12f5588407ce67019891ec7836b269018",
"md5": "1b609a4aa9061548ce8ca6cd2dd748d0",
"sha256": "5069958e70c1202b52a2200318c9fef65b20408619f4ea621960b5ec1d4e17ed"
},
"downloads": -1,
"filename": "hypnus-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1b609a4aa9061548ce8ca6cd2dd748d0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.13,>=3.8",
"size": 4742,
"upload_time": "2024-05-10T18:43:30",
"upload_time_iso_8601": "2024-05-10T18:43:30.532367Z",
"url": "https://files.pythonhosted.org/packages/d1/fa/7fa620e834884c8b0c57d8d292e12f5588407ce67019891ec7836b269018/hypnus-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b8c7889b25844942245bc9eba6a624251b90e005d8aaff4d8f09bf2850c79d2a",
"md5": "687c671cc70105eb1b4acce03a6c8ab1",
"sha256": "e8cd94326a6534bef7dcac4aa7f0975569d5651e38560ac5405dae0921cdf527"
},
"downloads": -1,
"filename": "hypnus-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "687c671cc70105eb1b4acce03a6c8ab1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.13,>=3.8",
"size": 4623,
"upload_time": "2024-05-10T18:43:32",
"upload_time_iso_8601": "2024-05-10T18:43:32.048424Z",
"url": "https://files.pythonhosted.org/packages/b8/c7/889b25844942245bc9eba6a624251b90e005d8aaff4d8f09bf2850c79d2a/hypnus-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-10 18:43:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "guillaumedsde",
"github_project": "hypnus",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "hypnus"
}