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.
  • 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.

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.4

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.4
File Size Uploaded
prank-0.1.4.tar.gz 6.0 kB Details

Built distribution (wheel)

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

Total release size: 11.7 kB

Release files / prank-0.1.4.tar.gz

Download URL prank-0.1.4.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cb7abac6fae6d527828f341a7d66738390b881a59f6adbad679ae9fa4b94a26e
BLAKE2b-256 checksum
How to use checksums
31f1ee75dbb02305b6f78712330bc9dcfab2684239a0604d10ec452538344f0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

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

Download URL prank-0.1.4-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b6a338414c3c43b1ef0b194d40a78ff931ac9ef74f1c0d0202f7bf59ccc8a2a5
BLAKE2b-256 checksum
How to use checksums
ae9c22ed7b5048e76f182ef893de147e1c6b47cccd02a9365f5da9985e03234c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.1.6

2 release files

0.1.5

2 release files

This release

0.1.4 This release

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