New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dissimilar

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dissimilar

A diff library with semantic cleanup

  • 0.1.1
  • PyPI
  • Socket score

Maintainers
1

py-dissimilar

CI PyPI

Python bindings to Rust dissimilar crate, a diff library with semantic cleanup.

Installation

pip install dissimilar

Usage

This module provides one function:

  1. def diff(a: str, b: str) -> List[Chunk]: ...
from dissimilar import diff, Equal, Delete, Insert

a = '[乀丁abcd一]'
b = '[一abcd丁]'
chunks = diff(a, b)
assert chunks == [
   Equal("["),
   Delete("乀丁"),
   Insert("一"),
   Equal("abcd"),
   Delete("一"),
   Insert("丁"),
   Equal("]"),
]

License

This work is released under the MIT license. A copy of the license is provided in the LICENSE file.

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc