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.1.5.tar.gz (11.2 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.1.5-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for lunacept-0.1.5.tar.gz
Algorithm Hash digest
SHA256 acc88fee00714a2aa31e23e3904a6642f8b52eb2f03b1c3f96b94999fc193b72
MD5 27e1e1bc68cb2e71f229a01f1b841bfc
BLAKE2b-256 503789543114b477e222a68b2036cf3adad4464b8b3069ae15eb63dbdbf8aaf4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lunacept-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 10.3 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.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 afddcffc9a2ee24d8c08061854b2342e60b9e8459d9f42239a985326c201587d
MD5 e18e3bcff18f4e85e5c73c2d5d50abbf
BLAKE2b-256 cddccb83fd450c983b623dc97c8d6370ab326bd20b7aced842ca405bd3214ca3

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