A Streamlit component to display diff betoween two strings
Project description
streamlit-diff-viewer
git-like diff viewer for streamlit webapp
Installation
pip install st-diff-viewer
Usage
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:
streamlit run example.py
Buiding from source
Prerequisites
- nodejs >= 18.x
- yarn >= 1.22.x
- poetry >= 1.2.x
- python >= 3.8.x
Building
./build.sh
Publishing
poetry publish
License
This project is licensed under the MIT License - see the 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
st_diff_viewer-1.0.7.tar.gz
(218.6 kB
view details)
Built Distribution
File details
Details for the file st_diff_viewer-1.0.7.tar.gz
.
File metadata
- Download URL: st_diff_viewer-1.0.7.tar.gz
- Upload date:
- Size: 218.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e3e01f1b0759e43ca4e5d02b93c8c4395006513fb696fe54a7fbfb2766aeb2c |
|
MD5 | 905f1066f417c70e959c2a1d3ccf9336 |
|
BLAKE2b-256 | dcc8f80e4ec2b86a64c68d2764f571b4f0284ea1bdaf6689437b1242b8ef59cd |
File details
Details for the file st_diff_viewer-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: st_diff_viewer-1.0.7-py3-none-any.whl
- Upload date:
- Size: 190.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.14 Darwin/24.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1bb5ab0acc1d065743e2dd86f37bd8387b14cc208973a2907e48ae27770b2331 |
|
MD5 | ef58219ad7b2c736684922b53830c4a6 |
|
BLAKE2b-256 | 4993405e792062525815a9a0e2e6d649183009abc0afd103a7159875f248d9f2 |