Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

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

Project Description

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


$ python -m unittest tests

[![Build Status](](

Version History

  • v1.3.0

    • Implemented a considerably faster variants (orders of magnitude).
    • Tested & working on Python 2.7.4, Python 3.3.1 & PyPy 1.9.0.
  • 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.

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(4.9 kB) Copy SHA256 Hash SHA256
Wheel 2.7 Oct 23, 2014
(3.2 kB) Copy SHA256 Hash SHA256
Source None Oct 23, 2014

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers