Skip to main content

Enhanced exception handler with intelligent LLM that can fix errors and enhance output

Project description

ExceptHook

Description

This replaces the exception hook with one with a nice traceback and LLM integration for fixing errors

Usage

In any module that you are working in, when you run the module and an exception is triggered, the custom exception handler will be triggered. By default when the handler is triggered, the default traceback is printed but with a little enhancement using the rich library.

Options

If anywhere in your code there are any of these options trigger different behaviours.

  • #: fix
  • #: enhance
Fix

This will contact Groq LLM to fix the exception code.

Enhance

This will enhance the traceback in a well structured way

Environment

Create a virtual environment and activate it

Method 1

  • Build the package locally and install using this command pip install .

Method 2

  • Install from PyPi using this command pip install excepthook.

Setup

  • Create a .env file with your GROQ_API_KEY
  • Run install_hook to write the sitecustomize.py in the sitepackages directory which will be providing the features.

Note: Must be in an environment.

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

excepthook-0.1.0.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

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

excepthook-0.1.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: excepthook-0.1.0.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for excepthook-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cdf203c4084f0e0889158fa3d47718b8936eae7890bea6d3628786041c5cbc05
MD5 cda7aaa618e01373dced59ab75d5b747
BLAKE2b-256 347b8cc1b22ff79112751f6bda84dc32d3a04f79e1de648150149c550b7ba8ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: excepthook-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for excepthook-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3654d27bc06b465f2d8d64d9e5ce3a6b68c865af5f04aff3f27ce4739d916387
MD5 2d80a3d7b85f43908390b90df1d1048b
BLAKE2b-256 d0b899824467e626175d6835346fb53ef119864adc387e06d68f552699f8b7fc

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