Skip to main content

Human-readable exception explanations for Python, including NumPy, Pandas, and requests.

Project description

ExpliPy

Human-readable Python exception explanations.
ExpliPy explains Python exceptions in plain English, including NumPy, Pandas, and requests errors. Works automatically for uncaught exceptions with a drop-in hook.


🚀 Features

  • Explain Python built-ins and common library exceptions
  • Supports NumPy, Pandas, Requests
  • Drop-in sys.excepthook** for uncaught exceptions
  • Human-readable, beginner-friendly messages
  • Safe for production use
  • Lightweight, pure Python (no AI required)

📦 Installation

pip install explipy

💡 Basic Usage

from explipy import explain_exception

try:
    x = 1 / 0
except Exception:
    explain_exception()

Output:

=== ExpliPy Exception Explainer ===
Type: ZeroDivisionError
Message: division by zero
Explanation: You attempted to divide by zero, which is not allowed.
=================================

⚡ Using the Global Hook

Automatically explain all uncaught exceptions:

import explipy

# Install hook globally
explipy.install_hook()

# Example
def divide(a, b):
    return a / b

divide(5, 0)  # ExpliPy will explain automatically

🧪 Library Exceptions Supported

  • Python built-ins: ZeroDivisionError, KeyError, IndexError, ValueError, AttributeError, etc.
  • NumPy: array index out-of-bounds, type errors, broadcasting issues
  • Pandas: missing columns, indexing errors, invalid values
  • Requests: connection errors, timeouts, HTTP errors

🔧 Development

git clone https://github.com/veliqq/explipy.git
cd explipy
pip install -e .[dev]

# Run tests
pytest

📄 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

explipy-0.1.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

explipy-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file explipy-0.1.2.tar.gz.

File metadata

  • Download URL: explipy-0.1.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for explipy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 64ccd0d8a4031e5a3c22cc51ce338ab1fdf09db0a69d74fdc5137dfc6c207e7a
MD5 795b1eec108b16006f28dc0d07fe5348
BLAKE2b-256 9624b90a5eabbdfe159a82b1683f40a193dd398e1314e062b4836dd36096b45b

See more details on using hashes here.

File details

Details for the file explipy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: explipy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for explipy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0b5dc64fd708ec113352346aacab00b77a614e81acece89920a9786e703cdeeb
MD5 9ef66bdc4c5f401e0b018941f50dbd54
BLAKE2b-256 d23c3cccd78e6e5df8beab146aacaa44dd9da2c93d9c1ec36fe0a6007db4133a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page