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

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

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

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

Analyzed by OSRepos on August 1, 2026

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

Related repositories

Similar repositories that may be relevant next.

AutoResearch: AI/ML Research Agents from Idea to Paper-Ready Evidence

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.

PythonAIMachine Learning
HarnessRouter: Unified Interface for AI Agent Harnesses

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.

AI AgentsAgent FrameworkLLM
AREX-Skill: A Skill Library for Automated Machine Learning and Auto-Research

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.

PythonAutomated Machine LearningAI Agents
oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory

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.

AI AgentHermes AgentAI Tools

Source repository

Open the original repository on GitHub.

12 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️