Skip to main content

Python generic error handler powered by ChatGPT

Project description

PyChatErr

Python global error handler powered by ChatGPT to enhance errors resolutions.

Description

PyChatErr installs a global exception handler that will send the cached exception and related code to ChatGPT completion engine asking it to explain the issue and propose solutions.

Installation

Install using pip:

pip install pychaterr

Usage

This module requires a OpenAI API Key:

  1. Generate a key at https://platform.openai.com/account/api-keys
  2. Export it with:
    export OPENAPI_API_KEY=sk-...
    

Then import the module in your code with:

import pychaterr

Examples

The examples/ folder contains examples showing this module behavior.

Run the samples with:

# Create and activate a virtual environment
pip install -e .
python examples/zerodivision.py

License

See LICENSE file for details.

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

pychaterr-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

pychaterr-0.0.1-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file pychaterr-0.0.1.tar.gz.

File metadata

  • Download URL: pychaterr-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for pychaterr-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e4a86d074dd853f6988e2332ee161585232b442509c012853f657cee94bf3cbc
MD5 515f5b9f0c79d44cde9c7cc134fbff00
BLAKE2b-256 c4cc685130ebad871ad4011bed67ffc5dff5c6350518080bf0aa9a65e8f635a8

See more details on using hashes here.

File details

Details for the file pychaterr-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pychaterr-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for pychaterr-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 451689a21fd41b9a7fcb6776addd2960d182ed0e4177469f7d23f917d7476a2a
MD5 d3c51c96324c34a377d21815b40afc1c
BLAKE2b-256 9d596c9716a7635c22bd44fc68b8842899769d63575c0000ffb201e7a91c43db

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page