$npx skillfedfor your agent

polyleven

A fast C-implemented library for Levenshtein distance

With conditionsPyPI Text ProcessingReleased Feb 20264.7M downloads / moPlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — polyleven-0.11.0-cp310-cp310-macosx_10_9_x86_64.whl · polyleven-0.11.0-cp310-cp310-macosx_11_0_arm64.whl · polyleven-0.11.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
v0.11.0 · released 2026-02-09 · Python >=3.8

Yes, if you need fast Levenshtein distance computation. The library is mature (Production/Stable), has no dependencies, supports current Python versions, and shows strong performance. Caveat: verify the license metadata before use in proprietary projects, as the license treatment is marked unclear despite the description claiming MIT.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later; compiled wheels available for most platforms but source build may require a C compiler.
  • Medium install friction due to compiled wheels, but pre-built binaries are available for common platforms (Python 3.10–3.12 on macOS, Linux, Windows, and ARM).
  • Last release was 186 days ago; repo is active and not archived.

License · maintenance · safety

(unclear) — License treatment is unclear in the metadata, though the description states MIT License. Verify the actual license terms before use in proprietary projects.

last release 2026-02-09 (186 days) · last repo commit 2026-02-09 · 87 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,665,512 downloads/mo, #2,261 on PyPI

Verify before relying

pip install polyleven

from polyleven import levenshtein
print(levenshtein('aaa', 'ccc'))  # Output: 3
print(levenshtein('acc', 'ccc', 1))  # With threshold: 1
  • License metadata is marked unclear despite description stating MIT—confirm actual license terms before use.
  • Performance claims in description (e.g., 2303420 pairs/sec) are from benchmarks on Python 3.5.3; current performance on modern Python versions unknown.
Same gist for agents: .md · .json

What it is and what it does

Polyleven is a C-implemented library that calculates the Levenshtein distance (edit distance) between two strings. It measures how many single-character edits—insertions, deletions, or substitutions—are needed to transform one string into another. The library is designed to be fast across both short inputs like English words and long inputs like DNA sequences, with no external dependencies beyond Python itself.

You use it by importing the `levenshtein()` function and passing two strings; it returns the distance as an integer. Optionally, you can provide a threshold as a third argument to stop early if the distance exceeds that limit, which can speed up comparisons when you only care whether strings are similar within a certain tolerance.

Use it for

  • Spell-checking and autocorrect: find candidate words within a fixed edit distance of a misspelled input.
  • Duplicate detection: identify similar records in datasets by comparing strings with a distance threshold.
  • DNA/protein sequence analysis: compute alignment distances for biological sequences.
  • Fuzzy string matching in search: rank results by similarity to a query term.
  • Data deduplication: flag records that are nearly identical but not exact matches.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need fast Levenshtein distance computation.

The library is mature (Production/Stable), has no dependencies, supports current Python versions, and shows strong performance. Caveat: verify the license metadata before use in proprietary projects, as the license treatment is marked unclear despite the description claiming MIT.

Install

polyleven on PyPI

Before you install

Medium install friction due to compiled wheels, but pre-built binaries are available for common platforms (Python 3.10–3.12 on macOS, Linux, Windows, and ARM). Last release was 186 days ago; repo is active and not archived.

Requires Python 3.8 or later; compiled wheels available for most platforms but source build may require a C compiler.

License in practice

License treatment is unclear in the metadata, though the description states MIT License. Verify the actual license terms before use in proprietary projects.

Quickstart

pip install polyleven

from polyleven import levenshtein
print(levenshtein('aaa', 'ccc'))  # Output: 3
print(levenshtein('acc', 'ccc', 1))  # With threshold: 1

Verify before relying

  • License metadata is marked unclear despite description stating MIT—confirm actual license terms before use.
  • Performance claims in description (e.g., 2303420 pairs/sec) are from benchmarks on Python 3.5.3; current performance on modern Python versions unknown.

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.8
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceAging 186 days since the last release
Last repo commit
First released
Downloads4,665,512 / month, #2,261 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableOperating System :: OS IndependentProgramming Language :: CProgramming Language :: Python :: 3

Evidence: polyleven-0.11.0-cp310-cp310-macosx_10_9_x86_64.whl; polyleven-0.11.0-cp310-cp310-macosx_11_0_arm64.whl; polyleven-0.11.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; polyleven-0.11.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; polyleven-0.11.0-cp310-cp310-musllinux_1_2_aarch64.whl; polyleven-0.11.0-cp310-cp310-musllinux_1_2_x86_64.whl; polyleven-0.11.0-cp310-cp310-win32.whl; polyleven-0.11.0-cp310-cp310-win_amd64.whl; polyleven-0.11.0-cp310-cp310-win_arm64.whl; polyleven-0.11.0-cp311-cp311-macosx_10_9_x86_64.whl; polyleven-0.11.0-cp311-cp311-macosx_11_0_arm64.whl; polyleven-0.11.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl; polyleven-0.11.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; polyleven-0.11.0-cp311-cp311-musllinux_1_2_aarch64.whl; polyleven-0.11.0-cp311-cp311-musllinux_1_2_x86_64.whl; polyleven-0.11.0-cp311-cp311-win32.whl; polyleven-0.11.0-cp311-cp311-win_amd64.whl; polyleven-0.11.0-cp311-cp311-win_arm64.whl; polyleven-0.11.0-cp312-cp312-macosx_10_13_x86_64.whl; polyleven-0.11.0-cp312-cp312-macosx_11_0_arm64.whl

Tags

Capabilities
levenshtein distanceedit distance calculationstring similarityfast string comparisonlevenshtein thresholddna sequence distance
Topics
string-similarityedit-distancec-extension
PyPI keywords
Levenshteindistance

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 › “levenshtein distance”

  • polylevenPolyleven computes Levenshtein distance between two strings using a…
  • editdistpyComputes Levenshtein and Damerau-Levenshtein edit distances between…
  • editdistanceComputes the edit distance (Levenshtein distance) between two…

Give your agent the search over MCP, or paste the wish link into any chat.

More Text Processing packages

regex Worth it
PyPI · Python Modules · released Jul 2026

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.

Apache-2.0 AND CNRI-Pythoncompiled wheel · 3.10+
437.7Mdownloads / mo
pyparsing Worth it
PyPI · Text Processing · released Jan 2026

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.

MITpure Python · 3.9+
412.7Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

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.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
RapidFuzz Worth it
PyPI · Text Processing · released Apr 2026

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.

MITcompiled wheel · 3.10+
184.2Mdownloads / mo
tinycss2 Worth it
PyPI · Text Processing · released Nov 2025

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.

BSD-3-Clausepure Python · 3.10+
113.2Mdownloads / mo

See also python-Levenshtein · editdistance · edlib · Levenshtein · editdistpy · Distance · textdistance · stringzilla · strsimpy · pylcs