Metadata-Version: 2.4
Name: suserror
Version: 0.2.0
Summary: A lightweight developer utility that plays professional/chaotic sound effects on Python exceptions.
Author-email: Ketan <dev@example.com>
Project-URL: Homepage, https://github.com/Ketan6969/suserror
Project-URL: Bug Tracker, https://github.com/Ketan6969/suserror/issues
Keywords: error,sound,utility,debugging,fun,exception
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Debuggers
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pygame>=2.0.0
Dynamic: license-file

# 🚨 suserror

[![PyPI version](https://img.shields.io/pypi/v/suserror.svg)](https://pypi.org/project/suserror/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Versions](https://img.shields.io/pypi/pyversions/suserror.svg)](https://pypi.org/project/suserror/)

**suserror** is a lightweight, fun developer utility that turns your Python exceptions into an auditory experience. Whether you want a subtle alert or total chaos, `suserror` ensures you *hear* your mistakes.

---

## ✨ Features

- 🎧 **Instant Feedback**: Plays a random sound whenever an exception goes uncaught.
- ⚡ **Non-blocking**: Sound playback happens in a daemon thread; your program won't freeze.
- 🎭 **Sound Modes**: Choose between `subtle` for a quick heads-up or `chaotic` for maximum impact.
- 🛠️ **Customizable**: Drop your own `.mp3` files into the `sounds/` folder to personalize your errors.
- 🐍 **Universal**: Works seamlessly with any Python 3.8+ project.

---

## 🚀 Installation

For the best experience, install `suserror` in a virtual environment:

```bash
# Create a virtual environment
python3 -m venv venv
source venv/bin/activate

# Install suserror
pip install .
```

*Note: Depends on `pygame` for high-quality audio handling.*

---

## 📖 Usage

### 🧙‍♂️ Automatic Mode (The "Set and Forget")
Just one line at the top of your script, and you're good to go. All uncaught exceptions will trigger a random sound.

```python
import suserror

# Start the auto-hook (default mode is 'all')
suserror.auto()

# Any error below will trigger a sound
1 / 0 
```

### 🎭 Switching Modes
You can control the vibe of your errors by passing a `mode` to `auto()`.

```python
# For a more professional/minimalist feel
suserror.auto(mode="subtle")

# For when you really messed up
suserror.auto(mode="chaotic")
```

### 🕹️ Manual Mode
Trigger a sound effect programmatically whenever you want.

```python
import suserror

try:
    process_sensitive_data()
except DataError:
    suserror.play_error(mode="chaotic")
    # Log the error or handle it
```

---

## 📂 Sound Categories

The package comes with several pre-bundled sounds categorized as follows:

- **Subtle**: Minimalist pings and short alerts (e.g., `anime-ahh.mp3`).
- **Chaotic**: Longer, louder, or more "sus" sounds (e.g., `among-us-role-reveal-sound.mp3`, `fahhhhhhhhhhhhhh.mp3`).

---

## 🛠️ Development & Customization

To add your own sound effects:
1. Navigate to the `suserror/sounds/` directory.
2. Drop your `.mp3` files there.
3. (Optional) Update `SOUND_MODES` in `player.py` to categorize them.

---

## 📜 License

Distributed under the MIT License. See `LICENSE` for more information.

---

<p align="center">Made with ❤️ for the Python community</p>
