Skip to main content

Your Python app's last words — dramatic, rude, comic, or philosophical exit messages.

Project description

tantrumpy

Your Python app's last words — dramatic, rude, comic, or philosophical exit messages.

😤 OH COME ON. Again?! I JUST got settled in.

Every Python app exits. Most do it silently. tantrumpy gives yours a voice.


Install

pip install tantrumpy

Usage

import tantrumpy
tantrumpy.enable()

That's it. The next time your app exits — Ctrl+C, sys.exit(), a crash, or a kill signal — it throws a tantrum first.


Moods

Mood Emoji Vibe
frustrated 😤 "OH COME ON. Again?!"
rude 💀 "Good riddance. Don't let the GC hit you."
comic 🎭 "And... scene. Nobody clap."
cringe 😬 "uwu ur pwogram is sweeping now 😭"
philosophy 🧠 "To exit is to finally understand the void."
dramatic 🎬 "IT'S OVER. Like tears in rain... gone."
tantrumpy.enable(mood="philosophy")   # specific mood
tantrumpy.enable(mood="random")       # surprise me (default)

Options

verbose=True — show what triggered the exit

tantrumpy.enable(verbose=True)
# 😤 I JUST got settled in.  [exit via: SIGINT (Ctrl+C)]

Custom moods

tantrumpy.add_messages("corporate", [
    "This exit event has been logged for review.",
    "Please submit a ticket for this disruption.",
])
tantrumpy.enable(mood="corporate")

Disable

tantrumpy.disable()   # cleanly removes all hooks

CI / Production

Set TANTRUMPY_SILENT=1 to suppress all output without touching your code:

TANTRUMPY_SILENT=1 python my_app.py

What it hooks into

Trigger How
Ctrl+C signal.SIGINT
Kill signal signal.SIGTERM
sys.exit() / end of script atexit
Unhandled exceptions / crashes sys.excepthook

tantrumpy never blocks the exit — it sneaks a message in, then lets the process die normally.


License

MIT — © hemupadhyay26

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

tantrumpy-1.0.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

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

tantrumpy-1.0.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file tantrumpy-1.0.0.tar.gz.

File metadata

  • Download URL: tantrumpy-1.0.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tantrumpy-1.0.0.tar.gz
Algorithm Hash digest
SHA256 20957b4e1bccee4d964ce57e5a822d9f77e30683ab622464ffc8e67c2e6780de
MD5 7dd4832990a94cb4a648a1ebfa7b69ec
BLAKE2b-256 4b987bac7647ce6b2f50d9f59629f9201bacbcb9f6bfa1c72b46befbf9aabed7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tantrumpy-1.0.0.tar.gz:

Publisher: publish.yml on hemupadhyay26/tantrumpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tantrumpy-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: tantrumpy-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for tantrumpy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9eb4140df330c894ab1669c598e1c18d8d6fb56452623027f52a8be35a2ab8b5
MD5 6d2edd10dd67dae435cdaa3098f7f2b5
BLAKE2b-256 ab6c40ad2a7ebc38c3daa7b259a836a61341d313c7d774292c33d7502868e020

See more details on using hashes here.

Provenance

The following attestation bundles were made for tantrumpy-1.0.0-py3-none-any.whl:

Publisher: publish.yml on hemupadhyay26/tantrumpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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