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.

awesome-cli-coding-agents: A Curated Directory of Terminal-Native AI Tools

awesome-cli-coding-agents: A Curated Directory of Terminal-Native AI Tools

August 9, 2026

The `awesome-cli-coding-agents` repository offers a comprehensive, curated directory of over 100 terminal-native AI coding agents. These powerful tools operate directly within your command line, enabling autonomous code reading, editing, and execution. The list also covers various harnesses and orchestration solutions for managing these agents.

AICLICoding Agents
QwenPaw: Your Personal AI Assistant for Local and Cloud Deployment

QwenPaw: Your Personal AI Assistant for Local and Cloud Deployment

August 7, 2026

QwenPaw is a powerful personal AI assistant designed for easy installation and deployment, either on your local machine or in the cloud. It supports multiple chat applications and offers highly extensible capabilities, making it a versatile tool for various AI-driven tasks. With its robust memory system and security features, QwenPaw aims to be an intuitive and private partner in your digital life.

agentai-agentchatbot
DeepTutor: Lifelong Personalized Tutoring with AI Agents

DeepTutor: Lifelong Personalized Tutoring with AI Agents

August 7, 2026

DeepTutor is an advanced AI-powered platform designed for lifelong personalized tutoring, integrating various learning modes into a single, extensible system. It leverages large language models and multi-agent systems to offer features like interactive chat, quiz generation, and skill development. This project provides a comprehensive environment for learners and educators seeking intelligent, adaptive educational tools.

AITutoringLLM
Memori: Agent-Native Memory Infrastructure for LLM Production Systems

Memori: Agent-Native Memory Infrastructure for LLM Production Systems

August 6, 2026

Memori provides agent-native memory infrastructure, offering an LLM-agnostic layer that transforms agent execution and conversations into structured, persistent state. Designed for enterprise use, it seamlessly integrates with existing data infrastructure and supports various deployment environments, ensuring robust memory management for AI agents.

agent-memoryLLMAI

Source repository

Open the original repository on GitHub.

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 ❤️