skillfed

Levenshtein

Python extension for computing string edit distances and similarities.

levenshtein Copyleft license GPL-2.0-or-later Active 398 v0.27.4 released

Install

levenshtein on PyPI

pip

pip install levenshtein

uv

uv add levenshtein

poetry

poetry add levenshtein

Package facts

License GPL-2.0-or-later (copyleft)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 1 — rapidfuzz
Maintenance actively maintained — 5 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: levenshtein-0.27.4-cp310-cp310-macosx_10_9_x86_64.whl; levenshtein-0.27.4-cp310-cp310-macosx_11_0_arm64.whl; levenshtein-0.27.4-cp310-cp310-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; levenshtein-0.27.4-cp310-cp310-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl; levenshtein-0.27.4-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; levenshtein-0.27.4-cp310-cp310-musllinux_1_2_aarch64.whl; levenshtein-0.27.4-cp310-cp310-musllinux_1_2_armv7l.whl; levenshtein-0.27.4-cp310-cp310-musllinux_1_2_x86_64.whl; levenshtein-0.27.4-cp310-cp310-win32.whl; levenshtein-0.27.4-cp310-cp310-win_amd64.whl; levenshtein-0.27.4-cp310-cp310-win_arm64.whl; levenshtein-0.27.4-cp311-cp311-macosx_10_9_x86_64.whl; levenshtein-0.27.4-cp311-cp311-macosx_11_0_arm64.whl; levenshtein-0.27.4-cp311-cp311-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl; levenshtein-0.27.4-cp311-cp311-manylinux_2_24_armv7l.manylinux_2_31_armv7l.whl; levenshtein-0.27.4-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; levenshtein-0.27.4-cp311-cp311-musllinux_1_2_aarch64.whl; levenshtein-0.27.4-cp311-cp311-musllinux_1_2_armv7l.whl; levenshtein-0.27.4-cp311-cp311-musllinux_1_2_x86_64.whl; levenshtein-0.27.4-cp311-cp311-win32.whl

Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

About Levenshtein

from the package's own PyPI description — quoted content, verbatim

Levenshtein

<p> <a href="https://github.com/rapidfuzz/Levenshtein/actions"> <img src="https://github.com/rapidfuzz/Levenshtein/workflows/Build/badge.svg" alt="Continuous Integration"> </a> <a href="https://pypi.org/project/levenshtein/"> <img src="https://img.shields.io/pypi/v/levenshtein" alt="PyPI package version"> </a> <a href="https://www.python.org"> <img src="https://img.shields.io/pypi/pyversions/levenshtein" alt="Python versions"> </a> <a href="https://rapidfuzz.github.io/Levenshtein"> <img src="https://img.shields.io/badge/-documentation-blue" alt="Documentation"> </a> <a href="https://github.com/rapidfuzz/Levenshtein/blob/main/LICENSE"> <img src="https://img.shields.io/github/license/rapidfuzz/Levenshtein" alt="GitHub license"> </a> </p>

Introduction

The Levenshtein Python C extension module contains functions for fast computation of:

  • Levenshtein (edit) distance, and edit operations
  • string similarity
  • approximate median strings, and generally string averaging
  • string sequence and set similarity

Requirements

  • Python 3.10 or later

Installation

```bash pip install...

Read as markdown · JSON record · Source repository · Homepage · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Levenshtein computes string edit distances, similarities, and related operations like approximate median strings using a fast C extension, with support for sequence and set comparisons.

Medium install friction due to compiled wheels; however, prebuilt binaries are available for Python 3.10–3.14 across Linux, macOS, and Windows architectures. Active maintenance (last commit 2026-08-10, release 5 days old) and a single lightweight runtime dependency on rapidfuzz support reliable installation.

Licensed under GPL-2.0-or-later (copyleft). Any derivative work or distribution must comply with GPL terms, including source code disclosure obligations if you modify or redistribute the package.

Usage

pip install levenshtein
import Levenshtein
dist = Levenshtein.distance('kitten', 'sitting')
print(dist)  # Output: 3

Requires Python 3.10 or later.

Verdict: Levenshtein is a well-maintained, actively developed library (398 GitHub stars, recent release) with no known vulnerabilities and broad platform support via prebuilt wheels. Its GPL-2.0-or-later copyleft license requires careful review if you plan to redistribute or modify the code. Medium install friction is offset by availability of compiled binaries for all major platforms and Python versions.

Needs verification

  • Whether rapidfuzz is a build-time-only dependency or a true runtime requirement that must be installed separately.
  • Performance characteristics and typical use cases where the C extension provides meaningful speedup over pure-Python alternatives.
string edit distancelevenshtein distancestring similarityapproximate string matchingedit operationsstring averaging

Similar packages