skip to navigation
skip to content

pylev 1.2.0

A pure Python Levenshtein implementation that's not freaking GPL'd.

Latest Version: 1.3.0

A pure Python Levenshtein implementation that’s not freaking GPL’d.

Based off the Wikipedia code samples at


  • Python 2.7.X, Python 3.3+ or PyPy 1.6.0+


Usage is fairly straightforward.:

import pylev
distance = pylev.levenshtein('kitten', 'sitting')
assert(distance, 3)


New BSD.



$ git clone
$ cd pylev
$ virtualenv env --distribute
$ . env/bin/activate
$ pip install unittest2


$ python -m unittest2 tests

Version History

  • v1.2.0

    • Fixed all incorrect spellings of “Levenshtein” (there’s no “c” in it).
    • Old methods are aliased for backward-compatibility.
  • v1.1.0

    • Implemented a much faster variant (several orders of magnitude).
    • The older variant was renamed to classic_levenschtein.
    • Tested & working on Python 3.3 & PyPy 1.6.0 as well.
  • v1.0.2

    • Python packaging is REALLY hard. Including the README this time.
  • v1.0.1

    • Python packaging is hard. Including the README this time.
  • v1.0.0

    • Initial release, just the naive implementation of Levenshtein.
File Type Py Version Uploaded on Size
pylev-1.2.0-py2.py3-none-any.whl (md5) Python Wheel 2.7 2013-12-03 4KB
pylev-1.2.0.tar.gz (md5) Source 2013-01-21 3KB
  • Downloads (All Versions):
  • 126 downloads in the last day
  • 760 downloads in the last week
  • 3276 downloads in the last month