Skip to main content

JediDebug

A Python library that motivates programmers with Star Wars quotes when bugs occur. May the Force be with your debugging!

Overview

JediDebug is a lighthearted Python library that catches exceptions and provides motivational Star Wars-themed wisdom. Perfect for keeping spirits high during frustrating debugging sessions and adding a touch of the Force to your development workflow.

Features

  • Automatically adds Star Wars quotes to exceptions
  • Provides a decorator for adding Jedi wisdom to function errors
  • Includes quotes from various Star Wars characters and films
  • Can be enabled/disabled at runtime
  • Supports custom Jedi quotes and categories

Installation

pip install jedidebug

Usage

Basic Usage

Simply import the library and activate the Jedi wisdom:

from jedidebug import JediDebug

# Activate the Jedi wisdom globally
JediDebug.activate()

# Now any unhandled exception will trigger a motivational Star Wars quote
def broken_function():
    return 1 / 0

try:
    broken_function()
except:
    pass  # The exception will be printed with Jedi wisdom

Function Decorator

You can use the decorator to add Jedi wisdom to specific functions:

from jedidebug import JediDebug

# Only provide Jedi guidance for specific functions
@JediDebug.jedi_function
def another_broken_function():
    x = [1, 2, 3]
    return x[10]  # Index error

try:
    another_broken_function()
except:
    pass  # This function will receive Jedi wisdom

Getting Quotes Directly

# Get a random quote
wisdom = JediDebug.get_motivational_quote()
print(wisdom)

# Get wisdom from a specific category (if available)
wisdom = JediDebug.get_quote_by_category('debugging')
print(wisdom)

Customizing Quotes

You can add your own Star Wars quotes to the library:

from jedidebug import JediDebug

# Add custom quotes
JediDebug.add_quotes([
    "The bug is strong with this one.",
    "You were the chosen one! You were supposed to destroy the bugs, not create them!",
])

# Add categorized quotes
JediDebug.add_categorized_quotes('syntax', [
    "The syntax is strong with this one, but your brackets are not.",
    "Your indentation has strayed to the dark side.",
])

Enable/Disable

You can enable or disable the Jedi wisdom at runtime:

# Disable Jedi wisdom
JediDebug.deactivate()

# Re-enable Jedi wisdom
JediDebug.activate()

Sample Output

Traceback (most recent call last):
  File "example.py", line 10, in <module>
    broken_function()
  File "example.py", line 7, in broken_function
    return 1 / 0
ZeroDivisionError: division by zero

✨ JEDI WISDOM ✨
🌟 I find your lack of comments disturbing.
🌟 Trust your instincts, young Padawan. The solution is near.

Quote Categories

JediDebug includes quotes for different error scenarios:

  • General debugging wisdom
  • Logic errors
  • Syntax issues
  • Runtime problems
  • And more!

Why Use JediDebug?

  • To add some fun to your debugging process
  • To maintain motivation during frustrating bug hunts
  • To bring the wisdom of Star Wars to your development workflow
  • Because even Jedi Masters encounter bugs in their code

Contributing

Feel free to contribute additional Star Wars quotes or features by submitting a pull request.

License

MIT License

Metadata

Release files for jedidebug 0.2.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 jedidebug 0.2.0
File Size Uploaded Provenance Actions
jedidebug-0.2.0.tar.gz 9.6 kB Without provenance Details for jedidebug-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 20.1 kB

Release files / jedidebug-0.2.0.tar.gz

Download URL jedidebug-0.2.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
52c750b289f9757673fa61f0e6e06d62bc24d6d3f4a46da67c3a4278a3a95269
BLAKE2b-256 checksum
How to use checksums
92d2df24c77707fdf83a6a95b4c669c596a3d855ecc57edddda4e95f05c7d999
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / jedidebug-0.2.0-py3-none-any.whl

Download URL jedidebug-0.2.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
17dc783eda1ef08abd2d21ce86eef86f1da2c3725e02949476b3a16bb69ca486
BLAKE2b-256 checksum
How to use checksums
6246cddcbc88fb44aa464a857fcaa1e53e9fddf831f667e0dcea017a8677b500
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Security for jedidebug 0.2.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.

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