Metadata-Version: 2.4
Name: debugbuddy-python
Version: 1.0.0
Summary: A beginner-friendly Python debugging assistant and error explainer.
Author: DebugBuddy Contributors
License: MIT License
        
        Copyright (c) 2026 DebugBuddy Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: python,debugging,errors,traceback,developer-tools
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Debuggers
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: build>=1.2; extra == "dev"
Dynamic: license-file

# 🐛 DebugBuddy

DebugBuddy is a beginner-friendly Python debugging assistant and error explainer.

It analyzes common Python exceptions and tries to answer:

- What happened?
- Why did it probably happen?
- Where did it happen?
- What should I check next?

The core package is local and requires **no API key**.

## Installation

```bash
pip install debugbuddy
```

For development:

```bash
pip install -e ".[dev]"
```

## Python API

```python
from debugbuddy import analyze_error, explain_error

try:
    result = 10 + "5"
except Exception as error:
    report = analyze_error(error)
    print(report.to_dict())
    explain_error(error)
```

## CLI

Run a Python file:

```bash
debugbuddy examples/broken_example.py
```

Analyze a saved traceback:

```bash
debugbuddy --traceback traceback.txt
```

JSON output:

```bash
debugbuddy examples/broken_example.py --json
```

## Supported error guides

TypeError, ValueError, NameError, IndexError, KeyError, AttributeError,
ZeroDivisionError, FileNotFoundError, ModuleNotFoundError, ImportError,
SyntaxError, IndentationError, UnboundLocalError, AssertionError.

## Project structure

```text
debugbuddy/
├── src/debugbuddy/
│   ├── __init__.py
│   ├── analyzer.py
│   ├── cli.py
│   ├── errors.py
│   ├── formatter.py
│   ├── models.py
│   └── suggestions.py
├── examples/
├── tests/
├── CHANGELOG.md
├── LICENSE
├── README.md
├── pyproject.toml
└── .gitignore
```

## Tests

```bash
pytest
```

## Build for PyPI

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
```

Then upload:

```bash
python -m twine upload dist/*
```

You need your own PyPI account and authentication token to publish.

## Important

DebugBuddy uses deterministic rules and heuristics. Suggestions are debugging guidance, not guaranteed automatic fixes.

## License

MIT. See LICENSE.
