--- id: python-levenshtein version: "0.27.4" license: GPL-2.0-or-later license_treatment: copyleft maintenance: active --- # python-Levenshtein — Python extension for computing string edit distances and similarities. License: copyleft · Maintenance: active · Downloads: 14.1M/mo ## 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 above — verify before relying. Computes Levenshtein edit distance, string similarity, and approximate median strings through a C extension module for fast string comparison operations. 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 pip install python-levenshtein uv add python-levenshtein poetry add python-levenshtein ## Installing python-Levenshtein 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. 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') Requires Python 3.10 or later. 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_current - Install friction: low - Maintenance: active - Downloads: 14.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags edit distance computation, string similarity matching, levenshtein distance, approximate string comparison, string averaging, sequence similarity, string-algorithms, fuzzy-matching [View on SkillFed](https://skillfed.io/packages/python-levenshtein) · [View on PyPI](https://pypi.org/project/python-levenshtein/)