adrenaline


Nameadrenaline JSON
Version 3.0.0 PyPI version JSON
download
home_pagehttps://github.com/ntamas/adrenaline
SummaryKeep your OS from sleeping (supports Windows and macOS)
upload_time2024-01-31 13:30:34
maintainer
docs_urlNone
authorTamas Nepusz
requires_python>=3.8,<4.0
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            `adrenaline`
============

Simple Python module to prevent your computer from going to sleep. Supports
Windows and macOS at the moment; Linux support is coming soon (hopefully).

Usage
-----

The module provides a context manager named `prevent_sleep()`. The computer
will not go to sleep while the execution is in this context:

```python
from adrenaline import prevent_sleep


with prevent_sleep():
    # do something important here
    ...
```

Optionally, you can also prevent the screen from turning off:

```python
with prevent_sleep(display=True):
    # do something important here
    ...
```

Command line interface
----------------------

You can also use this module from the command line as follows:

```sh
$ python -m adrenaline
```

The command line interface will prevent sleep mode as long as it is running.


Acknowledgments
---------------

Thanks to [Michael Lynn](https://github.com/pudquick/pypmset) for figuring out
how to do this on macOS.

Thanks to [Niko Pasanen](https://github.com/np-8/wakepy) for the Windows
version.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ntamas/adrenaline",
    "name": "adrenaline",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Tamas Nepusz",
    "author_email": "ntamas@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0e/cc/8347f41026b36c64d63a68d5a69be4f26b8c40419a4526246597287478f8/adrenaline-3.0.0.tar.gz",
    "platform": null,
    "description": "`adrenaline`\n============\n\nSimple Python module to prevent your computer from going to sleep. Supports\nWindows and macOS at the moment; Linux support is coming soon (hopefully).\n\nUsage\n-----\n\nThe module provides a context manager named `prevent_sleep()`. The computer\nwill not go to sleep while the execution is in this context:\n\n```python\nfrom adrenaline import prevent_sleep\n\n\nwith prevent_sleep():\n    # do something important here\n    ...\n```\n\nOptionally, you can also prevent the screen from turning off:\n\n```python\nwith prevent_sleep(display=True):\n    # do something important here\n    ...\n```\n\nCommand line interface\n----------------------\n\nYou can also use this module from the command line as follows:\n\n```sh\n$ python -m adrenaline\n```\n\nThe command line interface will prevent sleep mode as long as it is running.\n\n\nAcknowledgments\n---------------\n\nThanks to [Michael Lynn](https://github.com/pudquick/pypmset) for figuring out\nhow to do this on macOS.\n\nThanks to [Niko Pasanen](https://github.com/np-8/wakepy) for the Windows\nversion.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Keep your OS from sleeping (supports Windows and macOS)",
    "version": "3.0.0",
    "project_urls": {
        "Homepage": "https://github.com/ntamas/adrenaline",
        "Repository": "https://github.com/ntamas/adrenaline"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab1bd1d132be2b1e7ff5b0ea096d14f0902a8334b7801266a0c4d2ddbdde23dd",
                "md5": "5b9b6751d9a3ecd28d2de3eb39e8923a",
                "sha256": "726261d4ca2e3b19c24a517256198d879d16ba95ae8bea7ccaca540cefcbf42d"
            },
            "downloads": -1,
            "filename": "adrenaline-3.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b9b6751d9a3ecd28d2de3eb39e8923a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 8658,
            "upload_time": "2024-01-31T13:30:32",
            "upload_time_iso_8601": "2024-01-31T13:30:32.419870Z",
            "url": "https://files.pythonhosted.org/packages/ab/1b/d1d132be2b1e7ff5b0ea096d14f0902a8334b7801266a0c4d2ddbdde23dd/adrenaline-3.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ecc8347f41026b36c64d63a68d5a69be4f26b8c40419a4526246597287478f8",
                "md5": "01cc49723d431db34768f490ff4e5a75",
                "sha256": "a770f620881939ea3345aa07c2fc0712a16f792f0814783c65fbd0d8d6a04988"
            },
            "downloads": -1,
            "filename": "adrenaline-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "01cc49723d431db34768f490ff4e5a75",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 6458,
            "upload_time": "2024-01-31T13:30:34",
            "upload_time_iso_8601": "2024-01-31T13:30:34.067470Z",
            "url": "https://files.pythonhosted.org/packages/0e/cc/8347f41026b36c64d63a68d5a69be4f26b8c40419a4526246597287478f8/adrenaline-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-31 13:30:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ntamas",
    "github_project": "adrenaline",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "adrenaline"
}
        
Elapsed time: 0.17214s