semvec/pypi-packages huggingface dataset:
PyChatErr 0.1.0
Python generic error handler powered by ChatGPT
Requires Python: >=3.7

# 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`:

```shell
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:

```python
import pychaterr
```

# Demo

[![asciicast](https://asciinema.org/a/as6OC8KH0Oe6w78Yw10TexmsV.svg)](https://asciinema.org/a/as6OC8KH0Oe6w78Yw10TexmsV)

# Examples

The [examples/](examples/) folder contains examples showing this module behavior.

Run the samples with:

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

# License

See [LICENSE](LICENSE) file for details.
kibana-ql 0.2
Package to parse Kibana Query Language (KQL) strings.
Requires Python: >=3.7

# kibana-ql

Parser for the Kibana Query Language (KQL).

## Install

```shell
pip install kibana-ql
```

## Use

```python
from kibana_ql import KqlParser
p = KqlParser()
tree = p.parse("field: value")
p.ast(tree)  # {'field': 'field', 'value': 'value'}
tree = p.parse('document: "tax" and @date > now-2w')
p.ast(tree)  # {'op': 'and', 'left': {'field': 'document', 'value': 'tax'}, 'right': {'field': '@date', 'op': '>', 'value': ('now-2w',)}}
```

## Tests

```shell
py -m unittest discover -v -s tests -p "*_test.py"
```

## Notes

Grammar file based on <https://github.com/elastic/kibana/blob/main/packages/kbn-es-query/src/kuery/grammar/grammar.peggy>.