This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Levenshtein edit distance library for Python, Apache-licensed. Written by Lars Buitinck, Netherlands eScience Center, with contributions from Isaac Sijaranamual, University of Amsterdam.

Performs distance computations on either byte strings or Unicode codepoints.


Make sure you have Cython and a C++ compiler installed:

pip install cython

Installing a C++ compiler is so platform-dependent that I won’t show instructions. Consult your package manager.


python install

To run the tests, but not to actually use leven, you need six and Nose.


>>> from leven import levenshtein
>>> levenshtein("hello, world!", "goodbye, cruel world!")

About the implementation

The core algorithms have been implemented in C++. I used this instead of C to get templates, easier memory management and a better standard library, so the C++ code probably looks C-ish.


  • Implement Ukkonen’s algorithm for bounded Levenshtein distance
  • Implement Levenshtein automata for fast neighbor search in string spaces
  • Implement weighted Levenshtein distance
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
leven-1.0.4.tar.gz (20.2 kB) Copy SHA256 Checksum SHA256 Source Nov 22, 2013

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting