editdistance
Fast implementation of the edit distance (Levenshtein distance)
Decision gist · record as of 2026-08-14
Yes, if you need fast edit-distance computation and can accept an unmaintained package. The library is stable, has no known vulnerabilities, and prebuilt wheels minimize install friction on common platforms. However, be aware the repository is archived; no new features or security updates will be released. For active maintenance and ongoing support, consider alternatives, but for a straightforward, performant edit-distance calculation in an existing codebase, this remains a solid choice.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; if no prebuilt wheel exists for your platform, a C++ compiler is needed to build from source.
- Medium install friction due to compiled wheels; binary distributions are available for common platforms (Linux, macOS, Windows across multiple architectures), but source builds require a C++ compiler.
- Repository is archived and unmaintained since February 2024.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you may use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
last release 2024-02-10 (916 days) · last repo commit 2024-02-16 · 704 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,940,760 downloads/mo, #2,439 on PyPI
Alternatives
Verify before relying
pip install editdistance
import editdistance
editdistance.eval('banana', 'bahama')
# 2- Whether the archived repository will receive security patches or bug fixes in the future.
- Performance characteristics on very large sequences or in memory-constrained environments.
- Compatibility with Python versions beyond those explicitly tested in the wheel distribution.
What it is and what it does
editdistance is a Python library that calculates the edit distance (Levenshtein distance) between two sequences—the minimum number of single-character edits (insertions, deletions, substitutions) needed to transform one sequence into another. It wraps a C++ implementation with Cython bindings to achieve performance significantly faster than pure-Python alternatives. The library accepts strings or any hashable iterables (such as lists of words), making it more flexible than some competitors that only handle strings.
The package has no runtime dependencies and provides a single main function, `eval()`, that takes two sequences and returns their edit distance. It is commonly used in spell-checking, fuzzy matching, record deduplication, and natural-language processing tasks where approximate string matching is needed. The repository is archived and no longer actively maintained as of February 2024, though the last release (0.8.1) supports Python 3.8 and later with prebuilt wheels for major platforms.
Use it for
- Spell-checking and typo correction by finding the closest matching word in a dictionary.
- Fuzzy record matching to identify duplicate or near-duplicate entries in databases.
- Approximate string search in text processing pipelines where exact matches are too strict.
- Sequence alignment in bioinformatics or computational linguistics for comparing word or token sequences.
- Similarity scoring in recommendation systems to find similar user queries or product names.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need fast edit-distance computation and can accept an unmaintained package.
The library is stable, has no known vulnerabilities, and prebuilt wheels minimize install friction on common platforms. However, be aware the repository is archived; no new features or security updates will be released. For active maintenance and ongoing support, consider alternatives, but for a straightforward, performant edit-distance calculation in an existing codebase, this remains a solid choice.
Install
editdistance on PyPI
Before you install
Medium install friction due to compiled wheels; binary distributions are available for common platforms (Linux, macOS, Windows across multiple architectures), but source builds require a C++ compiler. Repository is archived and unmaintained since February 2024.
Requires Python 3.8 or later; if no prebuilt wheel exists for your platform, a C++ compiler is needed to build from source.
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install editdistance
import editdistance
editdistance.eval('banana', 'bahama')
# 2
Verify before relying
- Whether the archived repository will receive security patches or bug fixes in the future.
- Performance characteristics on very large sequences or in memory-constrained environments.
- Compatibility with Python versions beyond those explicitly tested in the wheel distribution.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 916 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 3,940,760 / month, #2,439 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: editdistance-0.8.1-cp310-cp310-macosx_10_9_universal2.whl; editdistance-0.8.1-cp310-cp310-macosx_10_9_x86_64.whl; editdistance-0.8.1-cp310-cp310-macosx_11_0_arm64.whl; editdistance-0.8.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; editdistance-0.8.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; editdistance-0.8.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl; editdistance-0.8.1-cp310-cp310-musllinux_1_1_aarch64.whl; editdistance-0.8.1-cp310-cp310-musllinux_1_1_i686.whl; editdistance-0.8.1-cp310-cp310-musllinux_1_1_x86_64.whl; editdistance-0.8.1-cp310-cp310-win32.whl; editdistance-0.8.1-cp310-cp310-win_amd64.whl; editdistance-0.8.1-cp311-cp311-macosx_10_9_universal2.whl; editdistance-0.8.1-cp311-cp311-macosx_10_9_x86_64.whl; editdistance-0.8.1-cp311-cp311-macosx_11_0_arm64.whl; editdistance-0.8.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; editdistance-0.8.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; editdistance-0.8.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl; editdistance-0.8.1-cp311-cp311-musllinux_1_1_aarch64.whl; editdistance-0.8.1-cp311-cp311-musllinux_1_1_i686.whl; editdistance-0.8.1-cp311-cp311-musllinux_1_1_x86_64.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 › “hamming distance alternative”
- editdistanceComputes the edit distance (Levenshtein distance) between two…
- DistanceComputes distance metrics (Levenshtein, Hamming, Jaccard, Sorensen)…
- ImageHashImageHash computes perceptual fingerprints of images using multiple…
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 editdistpy · edlib · pylev · python-Levenshtein · pyxDamerauLevenshtein · polyleven · textdistance · Distance · Levenshtein · apted