Skip to main content

No project description provided

Project description

bedtime

Python library for doing something when it's almost time for bed (the computer is going to sleep, or turning off).

import time, bedtime

def do_log():
    with open("./test.log", "a") as f:
        f.write("i went to sleep\n")

sleeper = bedtime.Listener(on_sleep=do_log)

while True:
    time.sleep(1)

    # later, after lights out...
    # test.log <
    #   i went to sleep

TODO:

  • Windows
  • MacOS
  • Linux (maybe usually the same as MacOS?)

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

Bedtime-0.0.1.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

Bedtime-0.0.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file Bedtime-0.0.1.tar.gz.

File metadata

  • Download URL: Bedtime-0.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0rc2

File hashes

Hashes for Bedtime-0.0.1.tar.gz
Algorithm Hash digest
SHA256 b26262ea591f92940821d52d73643ca8ab0a38706b717b840a93c10c60ffb59b
MD5 e717b14affc4cd9abd79b94c35ae2430
BLAKE2b-256 3f519f8d8df8de2d86d91df33cdd308e76387cbc9568665ec247b7e541f3cb39

See more details on using hashes here.

File details

Details for the file Bedtime-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Bedtime-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.0rc2

File hashes

Hashes for Bedtime-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 add5b523054e0f364ed0ce6fde843c76f797c67c5b6364c2d5a365ed0d752cc7
MD5 b522d1768043d15b148506bb3d192484
BLAKE2b-256 ca9bb39b204f697f21664affb7d794f429877832e31c68465bbadda9dac6768d

See more details on using hashes here.

Supported by

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