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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lunacept-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 0956f728e94eefd06baa1f8e6168c12b3203ecd19c0230167a19bc207de5abab
MD5 c976bfc21fc72236bf4cf63f802d85d4
BLAKE2b-256 87b37d7355bc7dceb588306afac67b5c57f29bb6c6d20fd769a3dd64a8ef5807

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lunacept-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 267fab6482cbf96e6800a806d67f61fd8f6974b3c4e8c8eeca42493cdbb71439
MD5 ac871f8f88d20d91d4ee1535aa49e5c6
BLAKE2b-256 6a31e60fb7d8a8b937eadad40342bc136f940a56a565a0c7ab9431d8df0d7a4f

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