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.1.0.tar.gz (8.5 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.1.0-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tantrumpy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f6e49941b729ce250a8202041b5bc5aa91a5b222a0b48eee21b88efc1cab6ace
MD5 0ef99a7328cdb454b33089f55c5a12c0
BLAKE2b-256 b0a865a51fe329d1025aa77e5d88df1a81f3a60202ff97b755b1bc5f4665f966

See more details on using hashes here.

Provenance

The following attestation bundles were made for tantrumpy-1.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: tantrumpy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.3 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 345c9e035bf2d2ddc8bc56c3cd0e1db584ba6f35b956d738e53cd0a5c9964ee4
MD5 a65948c647afa7044fc8eaac32344698
BLAKE2b-256 e69af127397b208f9d693505dd7b80accf06b8217f5eaf216d18ec877c84c67c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tantrumpy-1.1.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