python-Levenshtein
Python extension for computing string edit distances and similarities.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and fills a specific need for fast string distance computation. The GPL-2.0-or-later license is a hard requirement only if you need to distribute proprietary code; for internal use or open-source projects it poses no barrier.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction with a pure wheel distribution.
- Actively maintained as of 2026-08-08 with recent releases; requires Python 3.10 or later.
License · maintenance · safety
GPL-2.0-or-later (copyleft) — Licensed under GPL-2.0-or-later (copyleft). Any derivative work or distribution must comply with GPL terms; proprietary projects should review compatibility before use.
last release 2026-08-08 (6 days) · last repo commit 2026-08-08 · 126 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 14,084,844 downloads/mo, #1,248 on PyPI
Alternatives
Verify before relying
pip install levenshtein
from Levenshtein import distance
result = distance('kitten', 'sitting')- Whether the C extension compiles without additional system dependencies on all target platforms.
- Performance characteristics compared to pure-Python alternatives for typical workload sizes.
What it is and what it does
Levenshtein is a Python C extension that provides fast computation of string edit distances and similarity metrics. It implements the classic Levenshtein algorithm along with related operations like approximate median strings and sequence similarity, making it suitable for fuzzy string matching, deduplication, and text comparison tasks where performance matters.
The package is actively maintained and supports current Python versions (3.10 through 3.14). It installs as a wheel with low friction and has no external runtime dependencies beyond the Python standard library. The copyleft GPL-2.0-or-later license means derivative works must be open-sourced under compatible terms.
Use it for
- Fuzzy string matching in search or autocomplete systems where approximate matches are needed.
- Data deduplication by computing similarity scores between records to identify near-duplicates.
- Spell-checking and typo correction by finding the closest matching word in a dictionary.
- Record linkage in data integration pipelines to match entities across datasets.
- Sequence alignment in bioinformatics or text analysis workflows.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with low friction, and fills a specific need for fast string distance computation. The GPL-2.0-or-later license is a hard requirement only if you need to distribute proprietary code; for internal use or open-source projects it poses no barrier.
Install
python-levenshtein on PyPI
Before you install
Low install friction with a pure wheel distribution. Actively maintained as of 2026-08-08 with recent releases; requires Python 3.10 or later.
Requires Python 3.10 or later.
License in practice
Licensed under GPL-2.0-or-later (copyleft). Any derivative work or distribution must comply with GPL terms; proprietary projects should review compatibility before use.
Quickstart
pip install levenshtein
from Levenshtein import distance
result = distance('kitten', 'sitting')
Verify before relying
- Whether the C extension compiles without additional system dependencies on all target platforms.
- Performance characteristics compared to pure-Python alternatives for typical workload sizes.
Package facts
| License | GPL-2.0-or-later copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageLevenshtein |
| Maintenance | Actively maintained 6 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 14,084,844 / month, #1,248 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: python_levenshtein-0.27.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “edit distance computation”
- python-LevenshteinComputes Levenshtein edit distance, string similarity, and…
- kaldialignComputes edit distance, alignment, and word error rate (WER) between…
- pyxDamerauLevenshteinComputes Damerau-Levenshtein edit distance between sequences using…
Give your agent the search over MCP, or paste the wish link into any chat.
More Text Processing packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.
Install it if you need to parse text or define grammars programmatically.
fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.
Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.
Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.
RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.
Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.
tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.
Install it if your project requires CSS tokenization or syntax manipulation.
See also editdistance · Levenshtein · polyleven · pylev · edlib · strsimpy · Distance · fuzzysearch · pyxDamerauLevenshtein