Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

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

Based off the Wikipedia code samples at http://en.wikipedia.org/wiki/Levenshtein_distance.

Requirements

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

Usage

Usage is fairly straightforward.:

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

License

New BSD.

Tests

Setup:

$ git clone https://github.com/toastdriven/pylev.git
$ cd pylev
$ virtualenv env --distribute
$ . env/bin/activate
$ pip install unittest2

Running:

$ 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.

Metadata

Release files for pylev 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for pylev 1.2.0
File Size Uploaded
pylev-1.2.0.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylev 1.2.0
File Interpreter ABI Platform
pylev-1.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 7.4 kB

Release files / pylev-1.2.0.tar.gz

Download URL pylev-1.2.0.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0187706ab2fa9db9f1bf4976b5f8a1fc69f04e005f535672147da9c79669bfa1
BLAKE2b-256 checksum
How to use checksums
4932ae7248aa0b459475994d44917639d9b7a9b0208c71fc9142a381d9776797
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pylev-1.2.0-py2.py3-none-any.whl

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL pylev-1.2.0-py2.py3-none-any.whl
Size 4.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ded6f7b40ed01b7717f66303ac5e0c2d7a0b78c40f98ecd7e40d946e2176fdc0
BLAKE2b-256 checksum
How to use checksums
4cc1fbf1e7949bf8a9d96512a3d236e2f51b1c185fedf858b97e53393d6a0f63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.4.0

2 release files

1.3.0

2 release files

This release

1.2.0 This release

2 release files

1.1.0

1 release file

1.0.2

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page