GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rapidfuzz/CyDifflib: CyDifflib is a fast implementation of difflib's algorithms, which can be used as a drop-in replacement.

BranchesTags
Open more actions menu

Latest commit

 

History

31 Commits
31 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bench
bench
 
 
src/cydifflib
src/cydifflib
 
 
tests
tests
 
 
tools
tools
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CMakeLists.txt
CMakeLists.txt
 
 
LICENSE
LICENSE
 
 
MANIFEST.in
MANIFEST.in
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

CyDifflib

Continuous Integration PyPI package version Python versions
GitHub license

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

🚀 Benchmarks

The following benchmark compares the performance in the original difflib implementation, the library cdifflib and CyDifflib

Benchmark CyDifflib

⚙️ Installation

You can install this library from PyPI 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 the cydifflib module instead of difflib:

# from difflib import SequenceMatcher
from cydifflib import SequenceMatcher

The official documentation 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. for thefuzz this can be done in the following way:

from cydifflib import SequenceMatcher
import difflib

difflib.SequenceMatcher = SequenceMatcher
from thefuzz import fuzz

👍 Contributing

PRs are welcome!

  • Found a bug? Report it in form of an issue. 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-present Max Bachmann. CyDifflib is free and open-source software licensed under the MIT License.

About

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

Topics

cythondifflibhacktoberfestpythonstring-comparisonstring-matchingstring-similarity

Resources

Readme
MIT license

Security policy

Security policy
Activity
Custom properties

Stars

32 stars

Watchers

1 watching

Forks

6 forks
Report repository

Releases

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.