# python-Levenshtein: Fast Levenshtein Distance and String Similarity in Python

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/ztane-python-levenshtein
Generated for open source discovery and AI-assisted research.

python-Levenshtein is a Python C extension module designed for high-performance computation of Levenshtein distance and various string similarity metrics. It provides functions for edit distance, string similarity, approximate median strings, and string sequence/set similarity, supporting both normal and Unicode strings. This library is a crucial tool for applications requiring efficient text comparison and analysis.

GitHub: https://github.com/ztane/python-Levenshtein
OSRepos URL: https://osrepos.com/repo/ztane-python-levenshtein

## Summary

python-Levenshtein is a Python C extension module designed for high-performance computation of Levenshtein distance and various string similarity metrics. It provides functions for edit distance, string similarity, approximate median strings, and string sequence/set similarity, supporting both normal and Unicode strings. This library is a crucial tool for applications requiring efficient text comparison and analysis.

## Topics

- Python
- Levenshtein
- String Similarity
- Text Processing
- C Extension
- Edit Distance
- Open Source
- Performance

## Repository Information

Last analyzed by OSRepos: Sat Aug 01 2026 16:48:23 GMT+0100 (Western European Summer Time)
Detail views: 1
GitHub clicks: 1

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

python-Levenshtein is a powerful Python C extension module that offers highly optimized functions for computing Levenshtein distance and other string similarity metrics. It's designed for speed, making it ideal for applications that require fast text comparison and analysis. The module includes functionalities for:

*   Levenshtein (edit) distance and edit operations
*   String similarity
*   Approximate median strings and string averaging
*   String sequence and set similarity

It fully supports both normal and Unicode strings, and is compatible with Python 2.2 or newer, including Python 3.

*Note: The project is currently looking for a new maintainer, as indicated in its README.*

## Installation

Installing python-Levenshtein is straightforward using pip:

bash
pip install python-Levenshtein


## Examples

The module provides a `StringMatcher.py` class, which is an example of a `SequenceMatcher`-like class built on top of Levenshtein. While it may miss some of `SequenceMatcher`'s functionality, it also offers extra features. For detailed usage and more examples, it is recommended to refer to the official documentation.

## Why Use python-Levenshtein?

The primary advantage of python-Levenshtein lies in its performance. Being a C extension, it offers significantly faster computation of Levenshtein distance and string similarity compared to pure Python implementations. This makes it an invaluable library for:

*   **Text Processing**: Efficiently comparing and analyzing large volumes of text data.
*   **Fuzzy Matching**: Implementing robust fuzzy search algorithms.
*   **Data Cleaning**: Identifying and merging similar, but not identical, entries.
*   **Bioinformatics**: Applications involving sequence alignment.

Its comprehensive set of functions for various string comparison tasks, combined with its speed, makes it a go-to choice for developers needing high-performance string metrics in Python.

## Links

*   **GitHub Repository**: [https://github.com/ztane/python-Levenshtein](https://github.com/ztane/python-Levenshtein){:target="_blank"}
*   **Documentation**: [https://rawgit.com/ztane/python-Levenshtein/master/docs/Levenshtein.html](https://rawgit.com/ztane/python-Levenshtein/master/docs/Levenshtein.html){:target="_blank"}
*   **PyPI**: [https://pypi.python.org/pypi/python-Levenshtein](https://pypi.python.org/pypi/python-Levenshtein){:target="_blank"}