Metadata-Version: 2.1
Name: unwind
Version: 0.4.0
Summary: A simple solution to analysis and extract information from traceback.
License: MIT
Keywords: traceback,exception,crash-report
Author-email: RF-Tar-Railt <rf_tar_railt@qq.com>
Requires-Python: >=3.8
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Project-URL: Bug Reports, https://github.com/GraiaCommunity/Unwind/issues
Project-URL: Homepage, https://github.com/GraiaCommunity/Unwind
Project-URL: Source, https://github.com/GraiaCommunity/Unwind
Description-Content-Type: text/markdown

# Unwind

A simple solution to analysis and extract information from traceback

## install

```bash
pip install unwind
```

## usage

```python
from unwind import Report

with Report() as report:
    a = 1
    b = 2
    c = 'a'
    d = 1 + c

print(report.errors[0])
print(report.reports[0])

'''
(<class 'TypeError'>, TypeError("unsupported operand type(s) for +: 'int' and 'str'"), <traceback object at xxxxx>)
---------report--------
info = _TraceContext(file='xxxxxx', line=7, name='<module>', code='d = 1 + c', locals={...})
flag = operate
args = {'c': 'a'}
---------end------
'''
```

or

```python
from unwind import get_report

try:
    a = 1
    b = 2
    c = 'a'
    d = 1 + c
except Exception as e:
    print(get_report(e))

```
