Metadata-Version: 2.1
Name: st-diff-viewer
Version: 1.0.2
Summary: A Streamlit component to display diff betoween two strings
License: MIT
Author: Xueyuan Lin
Author-email: linxy59@mail2.sysu.eud.cn
Requires-Python: >=3.8, !=2.7.*, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, !=3.6.*, !=3.7.*
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: streamlit (>=0.63)
Description-Content-Type: text/markdown

# streamlit-diff-viewer
git-like diff viewer for streamlit webapp

![](docs/head.png)

## Installation

```bash
pip install st-diff-viewer
```

## Usage

```python
from st_diff_viewer import diff_viewer

old_text = "a = 0"
new_text = "a = 1"
diff_viewer(old_text, new_text, split_view=True)
```

run example:

```bash
streamlit run example.py
```

![img.png](docs/img.png)

## Buiding from source

### Prerequisites

- nodejs >= 18.x
- yarn >= 1.22.x
- poetry >= 1.2.x
- python >= 3.8.x

### Building

```bash
./build.sh
```

### Publishing

```bash
poetry publish
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

