Skip to main content

prank

PyPI Downloads

Turns every uncaught exception into emotional damage.

Tested on countless unfortunate exceptions.

Side effects may include laughter, frustration, and questioning your life choices.

⚠️ If you use this in production, we need to have a serious talk, dude.

Features

  • Does absolutely nothing useful.
  • Compatible with your worst debugging session.
  • Zero dependencies.
  • Zero configuration.
  • Zero benefits.
  • Maximum emotional damage.
  • Rare (1%) and Ultra Rare (0.1%) messages.
  • Every exception has multiple sarcastic message variants.
  • Over 300 unique messages across common exception types.
  • Makes every crash a little more memorable.
  • Makes Python just a little bit more sarcastic.

Installation

pip install prank

No restart required.

Emotional damage starts immediately.

Usage

import prank

prank.install()

Congratulations.

Your future exceptions are no longer alone.

Now wait for your next bug.

Example

Possible outputs:

Traceback (most recent call last):
...
ZeroDivisionError: division by zero

Math is hard.
RuntimeError: Oops

Who wrote this code?

Or maybe...

AttributeError: ...

Maybe None isn't what you thought it was.

The same exception can also produce a different sarcastic message on another run:

ZeroDivisionError: division by zero

The calculator has left the building.
FileNotFoundError: [Errno 2] No such file or directory: 'config.yaml'

This path has entered the witness protection program.

Or, if you're incredibly lucky...

Developer console unlocked.

API

prank.install()

Enable prank mode.

prank.uninstall()

Disable prank mode.

prank.is_installed()

Returns whether prank is currently installed.

FAQ

Does it fix bugs?

No.

Does it improve debugging?

Also no.

Then what's the point?

Because debugging is already painful. It might as well be funny.

Is this a serious project?

No.

Is this a joke?

Yes.

Then why is the code actually well-written?

...

Can I disable it?

Yes.

prank.uninstall()

License

Licensed under the MIT License.

No warranty.

Especially emotional warranty.

Read more in the disclaimer here.

Metadata

Release files for prank 0.1.6

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

Source distribution (sdist)

Source distribution for prank 0.1.6
File Size Uploaded
prank-0.1.6.tar.gz 11.5 kB Details

Built distribution (wheel)

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

Total release size: 21.6 kB

Release files / prank-0.1.6.tar.gz

Download URL prank-0.1.6.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
31460e3b2d2c585956da7449d86e27388f08f651f2f8c8135ba592cfa1927c10
BLAKE2b-256 checksum
How to use checksums
f917a48640f686dbf2b899f262c3fcd578f633d402feacedfedfa1c304b44267
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / prank-0.1.6-py3-none-any.whl

Download URL prank-0.1.6-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d19e22ca9ce71558b8bd9f41296fa9af014bb75d6b79e8ccb5c22bac21f1c37c
BLAKE2b-256 checksum
How to use checksums
937e04b31261507bc75f864209db0980970697341ad247e5144f2b38e940a070
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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