Skip to main content

Enhanced exception analysis library for Python - prints detailed information about what happened when an exception occurs

Project description

Lunacept

Enhanced Exception Analysis Library for Python

Lunacept provides precise and elegant exception information that reveals exactly what happened when an error occurs.

๐Ÿ“‹ Requirements

  • Python 3.11 or above
  • No external dependencies (uses only Python standard library)

๐Ÿš€ Quick Start

import lunacept

# Install the enhanced exception handler
lunacept.install()


# Now all exceptions will show detailed information
def example():
    user_data = {"name": "Alice", "age": 30}
    missing_key = "email"
    result = user_data[missing_key]  # KeyError with detailed context

example()

๐Ÿ“Š Output Example

Instead of a standard traceback, Lunacept shows:

============================================================
   KeyError: 'email'
============================================================

Frame #1: example.py:10 in example()
   line 10, cols 14-34

   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚   9 โ”‚     missing_key = "email"                                                โ”‚
   โ”‚  10 โ”‚     result = user_data[missing_key]                                      โ”‚
   โ”‚  11 โ”‚     return result                                                        โ”‚
   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Variables:
   user_data = {'name': 'Alice', 'age': 30}
   missing_key = 'email'

๐Ÿ”ง Configuration

import lunacept

# Configure output style
lunacept.configure(colors=True)  # Enable/disable colors

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

lunacept-0.2.1.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

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

lunacept-0.2.1-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

Details for the file lunacept-0.2.1.tar.gz.

File metadata

  • Download URL: lunacept-0.2.1.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for lunacept-0.2.1.tar.gz
Algorithm Hash digest
SHA256 859c839f9c571e1245e187e8b82ded10ef42f5bf77486ffadc56900fa560237e
MD5 428b19705cd42b7720f01930ac57dd47
BLAKE2b-256 de13d4a4f84f3d9b2a04032671a15dc6f30beb53d16044d4d3da4889acebbbe5

See more details on using hashes here.

File details

Details for the file lunacept-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: lunacept-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for lunacept-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47c0c51892d822db271470a4cc213356f2b65136f02e11d0253ead2a6175406f
MD5 8f945fa20289d5431c974f0346e0c336
BLAKE2b-256 0db43f9bcd9fc5db49aa521a665c6d8f4ec46ac6aae178852aee3b186f97c1ff

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