Skip to main content

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

img.png

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.1.tar.gz (223.0 kB view hashes)

Uploaded Source

Built Distribution

st_diff_viewer-1.0.1-py3-none-any.whl (186.1 kB view hashes)

Uploaded Python 3

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