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.1.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.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: explipy-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 0295b6371ef3a3bb89d94954cbe6e8171061a7b1ebdfb90c7c316e672c197d08
MD5 b26f133ce22081982b27b4d15a4dcec9
BLAKE2b-256 658657b2151391c0e1dbf0f09ae7b31672f2e6637ea212098feade5a06813b71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: explipy-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c87f8777c3fd19961a3ddd8b5c5467b56d5e4494551a21d71866e645c7a75f15
MD5 6277e4eb38b9fa988bddca3c4e9d279c
BLAKE2b-256 ce8471a5fb2c1984762dd7ffd7cd79c3f60da7ad591e5d94e32f7cb76512af2e

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