Skip to main content

Python Library to visualize string edit

Project description


VisEdit is a visualiation library for string edit and differences between two strings.

Main Features

  • visualize differences between two strings
  • generate formatted text and html


install using pip:

$ pip install visedit

Example Codes

Generate formatted text or html

from visedit import StringEdit
source_str = "kitten"
target_str = "sitting"
se = StringEdit(source_str, target_str)
text = se.generate_text()

# spaces will be truncated if truncate=True
text = se.generate_text(truncate=True)
# also available html as well as text
html = se.generate_html()

Change color setting

# setting for text
e = StringEdit(source_str, target_str, text_color_settings={
"wrong": "YELLOW",
"correct": "GREEN",
"base": "WHITE",
# setting for html
e = StringEdit(source_str, target_str, html_color_settings={
"wrong": "YELLOW",
"correct": "GREEN",
"base": "WHITE",

available colors are:

  • RED
  • BLUE
  • CYAN

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for visedit, version 1.0.5
Filename, size File type Python version Upload date Hashes
Filename, size visedit-1.0.5-py3-none-any.whl (5.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size visedit-1.0.5.tar.gz (5.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page