Skip to main content

Introduction

Rust implementation of levenshtein distance (https://en.wikipedia.org/wiki/Levenshtein_distance), based on Wagner–Fischer_algorithm (https://en.wikipedia.org/wiki/Wagner%E2%80%93Fischer_algorithm).

Installation

pip install fastlevenshtein

Usage

First param is either a list or a str.

It will be compared to the second param that is a str.

The third param is the maximum value of levensthein. For example, if the third param is 3, if the levensthein value reach at least 3, the function with exit and return 3 as value. This third param is used to increase computation time when you are only interested in string that are close to each other. If you do not want to use early exit, you can just use a really high value for this param

from fastlevenshtein import levenshtein
levenshtein("string1", "string2", 999) # 999 so no early exit
>>> 1

from fastlevenshtein import levenshtein_list
levenshtein_list(["string1", "string2"], "string3", 999)
>>> [1, 1]

from fastlevenshtein import levenshtein_list
levenshtein_list(["aaaaaaaa", "bbbbbbbb"], "ccccccc", 3) # early exit at 3 maximum value for levensthein distance
>>> [3, 3]

License

fastlevenshtein is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

See the file COPYING for the full text of GNU General Public License version 2.

Metadata

Release files for fastlevenshtein 0.2.1

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

Built distributions (wheels)

Table of built distributions (wheels) for fastlevenshtein 0.2.1
File Actions
fastlevenshtein-0.2.1-cp39-cp39-manylinux_2_24_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.24+ x86-64 Details for fastlevenshtein-0.2.1-cp39-cp39-manylinux_2_24_x86_64.whl
fastlevenshtein-0.2.1-cp38-cp38-manylinux_2_24_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.24+ x86-64 Details for fastlevenshtein-0.2.1-cp38-cp38-manylinux_2_24_x86_64.whl
fastlevenshtein-0.2.1-cp37-cp37m-manylinux_2_24_x86_64.whl CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.24+ x86-64 Details for fastlevenshtein-0.2.1-cp37-cp37m-manylinux_2_24_x86_64.whl
fastlevenshtein-0.2.1-cp36-cp36m-manylinux_2_24_x86_64.whl CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.24+ x86-64 Details for fastlevenshtein-0.2.1-cp36-cp36m-manylinux_2_24_x86_64.whl

Total release size: 705.7 kB

Release files / fastlevenshtein-0.2.1-cp39-cp39-manylinux_2_24_x86_64.whl

Download URL fastlevenshtein-0.2.1-cp39-cp39-manylinux_2_24_x86_64.whl
Size 176.3 kB
Tags CPython 3.9 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
83a26f8fe24096c554d0780963ae10ab2e76ba015b24c74ef0973c213a6742ae
BLAKE2b-256 checksum
How to use checksums
504e11c3cb07e5f9d2f4cf3e335eede2b05d91cd4e37875fbcc2b66d567975a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.12

Release files / fastlevenshtein-0.2.1-cp38-cp38-manylinux_2_24_x86_64.whl

Download URL fastlevenshtein-0.2.1-cp38-cp38-manylinux_2_24_x86_64.whl
Size 176.5 kB
Tags CPython 3.8 Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
5c3a7597704a71e2f8ec21578c3e8070aabeacc47074065e9cf30c1816a2d252
BLAKE2b-256 checksum
How to use checksums
6c5fabe96dc73859f37b72ed788f17cdd24c46cc3a729afc7254e93494ef62e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.12

Release files / fastlevenshtein-0.2.1-cp37-cp37m-manylinux_2_24_x86_64.whl

Download URL fastlevenshtein-0.2.1-cp37-cp37m-manylinux_2_24_x86_64.whl
Size 176.5 kB
Tags CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
12491d70d9131f507d0680b3a29595f890ca61981be9f71374fab2af61e087ff
BLAKE2b-256 checksum
How to use checksums
4127bc779f351ae3a62f181d3341132a6f8938c0331cc2be47d6dc28e5cbf2e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.12

Release files / fastlevenshtein-0.2.1-cp36-cp36m-manylinux_2_24_x86_64.whl

Download URL fastlevenshtein-0.2.1-cp36-cp36m-manylinux_2_24_x86_64.whl
Size 176.4 kB
Tags CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.24+ x86-64
SHA-256 checksum
How to use checksums
165b406fbc95d4bf5404be75a4b24c15951567e9b0a6b3c4e95d6b059e87505f
BLAKE2b-256 checksum
How to use checksums
272926cb3dbbedf79faadec3d9de9fede46029b7a4bbb96133e0435b9aa6a484
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/0.12.12

Security for fastlevenshtein 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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