--- id: editdistance version: "0.8.1" license: MIT license_treatment: permissive maintenance: abandoned --- # editdistance — Fast implementation of the edit distance (Levenshtein distance) License: permissive · Maintenance: abandoned · Downloads: 3.9M/mo ## 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 above — verify before relying. Computes the edit distance (Levenshtein distance) between two sequences using a fast C++ and Cython implementation, supporting strings and any hashable iterables. 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 pip install editdistance uv add editdistance poetry add editdistance ## Installing editdistance 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. 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 Requires Python 3.8 or later; if no prebuilt wheel exists for your platform, a C++ compiler is needed to build from source. 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_current - Install friction: medium - Maintenance: abandoned - Downloads: 3.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags levenshtein distance, edit distance calculation, string similarity, sequence alignment, fast string matching, hamming distance alternative, text similarity metric, string-similarity, levenshtein, fuzzy-matching [View on SkillFed](https://skillfed.io/packages/editdistance) · [View on PyPI](https://pypi.org/project/editdistance/)