python-Levenshtein: Fast Levenshtein Distance and String Similarity in Python
This repository profile is provided by osrepos.com, an open source repository discovery platform.
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.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
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:
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
- Documentation: https://rawgit.com/ztane/python-Levenshtein/master/docs/Levenshtein.html
- PyPI: https://pypi.python.org/pypi/python-Levenshtein
Related repositories
Similar repositories that may be relevant next.
AutoResearch: AI/ML Research Agents from Idea to Paper-Ready Evidence
September 22, 2026
AutoResearch is an open-source agent workflow designed for AI and machine learning research. It automates the entire research process, from generating ideas and planning experiments to execution, analysis, and independent evaluation. This project helps researchers produce paper-ready evidence efficiently and with traceable provenance.
HarnessRouter: Unified Interface for AI Agent Harnesses
September 22, 2026
HarnessRouter Community Edition provides a self-hosted, Apache-2.0 licensed unified interface for various AI agent harnesses like Codex, Claude Code, and Hermes. It allows users to run multiple agents through a single API, offering features such as sessions, streaming, file handling, and cancellation. The project implements the open-standard Unified Harness Protocol (UHP), ensuring users maintain control over their keys and infrastructure.

AREX-Skill: A Skill Library for Automated Machine Learning and Auto-Research
September 21, 2026
AREX-Skill is a powerful skill library designed to advance automated machine learning and auto-research. It distills over 5,000 executable skills from more than 1,000 popular GitHub repositories, making complex ML knowledge directly usable by coding agents. This project significantly enhances agent performance in various research tasks by providing structured, validated operating knowledge.

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory
September 17, 2026
oh-my-hermes is an all-in-one plugin designed to significantly enhance the Hermes Agent. It provides advanced coding intelligence, a robust long-term memory system, and optimized workflow packages, transforming standard Hermes requests into structured, actionable tasks with clear operational layers.
Source repository
Open the original repository on GitHub.
12 counted GitHub visits