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: Enusre you have created a virtual environment, activated it and installed the packge in it.

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.2.0.tar.gz (16.6 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.2.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: excepthook-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for excepthook-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ba7c60bfe487ed74b2c48a27ef4865548bd8760de13413641c383ab6b20875c4
MD5 a60f25a1721059f76ddf3871d06fdacb
BLAKE2b-256 2b39b6fbc5494bf723fa240790bfc1e13519909eb0480583ea64fb6c8f1f4a84

See more details on using hashes here.

Provenance

The following attestation bundles were made for excepthook-0.2.0.tar.gz:

Publisher: excepthook-publish.yml on khonello/ExceptHook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: excepthook-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for excepthook-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18d6dc6cea5aa4c341c16c391f17a6adc90e5bd5568b096371b93a450e84c324
MD5 8c5637f7c0296615360f7e7452327163
BLAKE2b-256 0b205cd32a8f99a2476fd54d66211657646d01f30169f90efecd96e16cd2b279

See more details on using hashes here.

Provenance

The following attestation bundles were made for excepthook-0.2.0-py3-none-any.whl:

Publisher: excepthook-publish.yml on khonello/ExceptHook

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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