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.2.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: Bedtime-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 fa1efee03a69b8233356c4788fe4d2bcc0bcd52ea59688dc4f88f31f9046963a
MD5 a374ace7aa0e76aeceaabbee174a9986
BLAKE2b-256 7487e109dc68b70e3e56134905386d5c8b73bb06f40ed960adf1e164ab03f91c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: Bedtime-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 817b0ed4a82cc1c06b46cdfbda08ba79041c922169aebd42c12ebcc19d5ec51a
MD5 ccc8f6aa04acdfa73bf07e76237f5809
BLAKE2b-256 3d1c9bb00e688cc565fb75535b62cf4d35490dafe9b88a971e01556d7cedde79

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