Skip to main content

Put your computer to sleep, etc.

Project description

os_bedtime

os_bedtime is a python module made for windows (for now) to turn off the computer with simple functions.
Currently support for Linux is unplanned but kept in mind, but for me there is no way to test OSX :'(
So that will come much later.

Early access

Currently this module is yet in the major version 0.x.x and with that in mind the interface might change at any time.
It is kept in mind to make changes as little as possible, but it is not out of question that things might brake during early access.

If you feel like contributing. (OSX or Linux or improvements for Windows even) Let me know in an issue.

How to install

pip install os-bedtime

Issue: Sleep issues

Your computer might be waking from sleep mode because certain peripheral devices, such as a mouse, a keyboard, or headphones are plugged into a USB port or connected via Bluetooth. It might also be caused by an app or a wake timer.

Windows: Turn off wake-timers

Wake timers are timers that may wake your computer on a set time. Disabling this make this impossible until you re-enable it.
If you use wake-timers to automatically wake your computer at 7 am or something, this will not work anymore.

  1. Right-click Windows button. Select Energy-management
  2. Scroll down and click the link for Extra energy-settings
  3. Click the Change power-plan to the right of the currently selected power-plan
  4. Click the Change advanced energy-settings link
  5. Scroll and find Sleep -> Allow activation timers
  6. Set it to No or Disabled

Windows: Turn off peripheral-devices access to wake your pc

Peripheral-devices (like for example your keyboard) have access to wake your computer out of sleep-mode. For something like a keyboard this makes sense. You press the space-bar and the computer wakes up, but there are other devices where this might make less sense. For example a network device may wake your computer?

  1. left-click the windows button. Type CMD and choose Run as administrator
  2. It will prompt you if you did this and allow this... Allow
  3. Type in the console powercfg -devicequery wake_armed and press enter
  4. It gives you a list of all your peripheral devices that may wake up your computer out of sleep mode
  5. Right-click Windows button. Select Device-management
  6. Find all the devices (or the onces you want to disable), in the list and double-click them
  7. Find the tab called: Energy-management and uncheck the checkbox for This device may wake the computer out of sleepmode
    Note: Some devices like mice and keyboards show up multiple times (that is normal), but not all have this tab (that is also normal). Find the onces that do and disable those

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

os_bedtime-0.2.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

os_bedtime-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file os_bedtime-0.2.0.tar.gz.

File metadata

  • Download URL: os_bedtime-0.2.0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for os_bedtime-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a2031dee6847c923831c738155c7da64cca0be61c69b87507ba8deff2bf94aa8
MD5 b80224fb0862ffe8ea417bc01ab3e6a1
BLAKE2b-256 67d9b226e234a13cf8f775bde295a3519ddeb2977601c63cd4afcf46a642d9e5

See more details on using hashes here.

File details

Details for the file os_bedtime-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: os_bedtime-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for os_bedtime-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73f4a77b4954c3e84f981f13993a20a2a45dcec9fe2004f1d2d934576ee4fd9c
MD5 785a476d73d8ec2ae38e1bca0717d8e8
BLAKE2b-256 db164433c74eae45a4456dba2e1cd326a8a80b85b8d150e485abbe690c1acac5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page