Skip to main content

letmegetcoffee

A python module that provides functionality to notify you when something goes wrong

Usage

from letmegetcoffee import lmgc  # or use wild import since it equals to lmgc only

error(s) to catch; defaults to (Exception,); not necessary to set

lmgc.EXCEPTIONS = ValueError

what to do if an error occurred; necessary to set after import, since it defaults to print and just silently prints the exception-object

lmgc.ON_EXCEPTION = lmgc.on_exception_beep

on_exception_ - functions

  • on_exception_beep(e):

    Beep in a while loop to notify if something goes wrong. Remeber to turn your volume up

  • on_exception_mail(e): [IN DEVELOPEMENT]

    Send an email to notify if something goes wrong.

  • on_exception_webpage(e): [IN DEVELOPEMENT]

    Host a webpage inside the local network to show the state of the running program. Seems unlikly though since hosting an http server (during the entire runtime, not only when an error occured) is a rather resource-expensive task

It is also possible to use your own function. Just note:

  • the function has to take the excepion-object as an argument

    exception-object like in except Exception as e: pass

  • lmgc.ON_EXCEPTION = yourFunction has to be set before the decorator is used

Example

from random import randint
from letmegetcoffee import lmgc
lmgc.ON_EXCEPTION = lmgc.on_exception_beep


@lmgc.catch
def testing(number, message):
    print(message)
    while True: number / randint(0, number)


if __name__ == '__main__':
    testing(1000000, message='Hello World!!!')  # args and kwargs work

Metadata

Release files for letmegetcoffee 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for letmegetcoffee 0.1.0
File Size Uploaded Provenance
letmegetcoffee-0.1.0.tar.gz 3.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for letmegetcoffee 0.1.0
File Interpreter ABI Platform
letmegetcoffee-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / letmegetcoffee-0.1.0.tar.gz

Download URL letmegetcoffee-0.1.0.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8ee9c954ee19a82f41092f26534adcb56bb134d700d98d392db8229e9144e508
BLAKE2b-256 checksum
How to use checksums
3be431832e650963d8561c402611ea8e3037234440b2c32a642d67da779dc62c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.10.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.4.3

Release files / letmegetcoffee-0.1.0-py3-none-any.whl

Download URL letmegetcoffee-0.1.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37edc9f49995f9e4cf6d061694c5aa8ed893a838885a10c40bade4db0e8b2fd8
BLAKE2b-256 checksum
How to use checksums
5bf0208f7b0c4cf83f40a9d579f3b8823e7093b8cb3c6b148353bdd9b11e8015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.10.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.4.3

Security for letmegetcoffee 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page