Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

CyDifflib is a fast implementation of difflib's algorithms, which can be used as a drop-in replacement.

License

NotificationsYou must be signed in to change notification settings

rapidfuzz/CyDifflib

Repository files navigation

Continuous IntegrationPyPI package versionPython versions
GitHub license

CyDifflib is a fast implementation of difflib's algorithms, which can be used as a drop-in replacement.

🚀 Benchmarks

The followingbenchmark compares the performance in the originaldifflib implementation, the librarycdifflib and CyDifflib

Benchmark CyDifflib

⚙️ Installation

You can install this library fromPyPI with pip:

pip install cydifflib

CyDifflib provides binary wheels for all common platforms.

Source builds

For a source build (for example from a SDist packaged) you only require a C++11 compatible compiler. You can install directly from GitHub if you would like.

pip install git+https://github.com/rapidfuzz/CyDifflib.git@main

📖 Usage

The library can be used in the same way as difflib. Just use thecydifflib module instead ofdifflib:

# from difflib import SequenceMatcherfromcydifflibimportSequenceMatcher

The officialdocumentation of difflib explains how to use the library. If you work with a library which internally uses some of the algorithms of difflib it is possible to replace the implementation before importing this library. E.g. forthefuzz this can be done in the following way:

fromcydifflibimportSequenceMatcherimportdifflibdifflib.SequenceMatcher=SequenceMatcherfromthefuzzimportfuzz

👍 Contributing

PRs are welcome!

  • Found a bug? Report it in form of anissue. Any difference in behavior to difflib is considered as a bug.
  • Can make something faster? Great! Just avoid external dependencies and remember that external behavior does not change.
  • Have no time to code? Tell your friends and subscribers about CyDifflib.

Thank you ❤️

⚠️ License

Copyright 2021-presentMax Bachmann.CyDifflib is free and open-source software licensed under theMIT License.

About

CyDifflib is a fast implementation of difflib's algorithms, which can be used as a drop-in replacement.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2026 Movatter.jp