Package to calculate the Levenstein distance
Project description
levdist
A Python package to calculate the Levinstein distance algorithm implementation with non-GPL license, typing and speedups. The implementation is based on code samples from Levenstein Wiki.
Installation
pip install levdist
Usage
from levdist import levenshtein
distance = levenstein("dog", "cat")
Development
Setup
- Install PDM using this documentation
- Install development dependencies
pdm install
- Install
pre-commit
hookspre-commit install
Testing
This project is using pytest
for unit testing.
To run the test you need to run pdm test
In addition to that you can lint your code using pdm lint
and check the typing by pdm mypy
.
Type checks
mypy
is configured to run in strict mode for files in src
folder. Typing is not checked in tests
folder.
CI
PR checks
Each PR run GitHub actions for all actual Python versions to check if native extension is built and tests pass. Also formatting and typing will be checked.
The coverage is published to CodeCov.
Dependency updates
To update dependencies and pre-commit
hooks there is a GHA job that is scheduled to run weekly.
Release
To create a release, create a tag v<MAJOR>.<MINOR>.<PATCH>
. The release will be created with the source code and wheels.
Benchmark
The benchmark of this package can be run using pdm benchmark
command. It compare its speed with other Python implementations.
Check the BENCHMARK.md for the latest measurements.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file levdist-0.1.2.tar.gz
.
File metadata
- Download URL: levdist-0.1.2.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc866aa0a6b79da273442619837d9b1ea7f3ac5575b40c0ec4cc84cbae76b19d |
|
MD5 | d15512a94f868b5f263b7f70bc528ec9 |
|
BLAKE2b-256 | 25cdf556fc67ac6745458ceb55e29694b211d30c6f5aeac19401437b8f9145e3 |
File details
Details for the file levdist-0.1.2-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 13.9 kB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bff0f642e96f84ae44303c11e1d256317acebf6586ac74129c4457a6a19ea48d |
|
MD5 | fe1659ea2a536008812b487ad48290b0 |
|
BLAKE2b-256 | c0546798ff6c60a4250b88e7320b6006be355002ca0227762cb1a463c25533c2 |
File details
Details for the file levdist-0.1.2-cp313-cp313-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp313-cp313-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 49.7 kB
- Tags: CPython 3.13, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1c1604106fb33c0cb453a16940948d9cb262b73580a6ac79868b2a80f7a8aa9 |
|
MD5 | ebe8bb93c6ceebd8abee998200feb069 |
|
BLAKE2b-256 | ced4711c7b112e1d0fd422371625028cb52a5004786818db958b9a8368d32baa |
File details
Details for the file levdist-0.1.2-cp313-cp313-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp313-cp313-macosx_14_0_arm64.whl
- Upload date:
- Size: 14.6 kB
- Tags: CPython 3.13, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2897ecef33b995230f7bbffb911efeb4230fab936fd8811225b4397b7a8ea18f |
|
MD5 | f1fc242202a764e012b9ff36c48206aa |
|
BLAKE2b-256 | 022c86d85628f7e3d1875e88e4ea72a5e26ce68030fe4d4fb023141e57f7db54 |
File details
Details for the file levdist-0.1.2-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 13.9 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26fcfb44143df754ce218a8db5a21b92bd4df354a9c53c3275b74b1d85027740 |
|
MD5 | a100bbad002af9ab28657b84cb627751 |
|
BLAKE2b-256 | 3ed9bc0e8c7ab49cf61597b06b0a3458719bae028deff46af8ac0b71af3590bd |
File details
Details for the file levdist-0.1.2-cp312-cp312-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp312-cp312-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 49.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdcb2d78cf01052dd0b00017600bb5678c9d3c1cde94ea1eff4ede12355ddb19 |
|
MD5 | 777e98ee2a7b704a5e552cf395e60beb |
|
BLAKE2b-256 | 758cb4905638303c9b7805699199822d3e5077984428c3a797ef2f5e6d30b072 |
File details
Details for the file levdist-0.1.2-cp312-cp312-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 14.6 kB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a876eb112e2d483f8bc3efa1f5159e5b4d00f4a42672a051c32ebccf0eb4b34a |
|
MD5 | c099c0f481e2578832dab0f4d7ac208f |
|
BLAKE2b-256 | 347e899ece81b8eb0462041986ea8d2f4b60f1c352299ee333cc06d3ac23510e |
File details
Details for the file levdist-0.1.2-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 13.9 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93761d8f495f5a407cef4d7b699bb4ed884f3411ed29aad9fbb457ef6b912eb9 |
|
MD5 | 0cab0820a44e45c15de3741e88934882 |
|
BLAKE2b-256 | 50594e96655df02ba9ca16e22dd08460026d141b089a0b7b9c9851bac8cadb13 |
File details
Details for the file levdist-0.1.2-cp311-cp311-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp311-cp311-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 49.5 kB
- Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 479593e21116df0e2fda6be18b5d2798f4ad24e0b2068d021f2b26960075e9b2 |
|
MD5 | f352bceda1e207ae78ca59a581d6094c |
|
BLAKE2b-256 | 2424cdd0db7a87e314e9f7e42acd1a7c918c8756ded41e8f6f2daa04fee7df23 |
File details
Details for the file levdist-0.1.2-cp311-cp311-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp311-cp311-macosx_14_0_arm64.whl
- Upload date:
- Size: 14.6 kB
- Tags: CPython 3.11, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d85a043bd395bb9934916b1a99b8d0c9796f5630f4bcaa3cac0731990169d8d |
|
MD5 | 0f3830751cf861119b1e9eaecbbf7789 |
|
BLAKE2b-256 | 15acad07cc54dab7846e8faf02cd25913b94fd2932849e18f8ec390daa815ec6 |
File details
Details for the file levdist-0.1.2-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 14.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e30d2d77e909f43a7a323413fc299129ab1e2ddb39705f42f68cfda981aa66fe |
|
MD5 | 092605760feaf6f09275d8b9f2a76e71 |
|
BLAKE2b-256 | f6d7787517b9f5eab894e9694ef29ff423a2d932b92eb5a0079885837b7e28bc |
File details
Details for the file levdist-0.1.2-cp310-cp310-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp310-cp310-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 46.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3554ba50a6e1b6e647cb42f260c3abe19fefe409d2de177e3ea920f9c3a8cee7 |
|
MD5 | 560c7db7e23e333821bcb1c66fd04615 |
|
BLAKE2b-256 | 4ea8ce9663004078e126027e9f2cb1d189f18a2acd3abfdaf0e1a23fe628f73f |
File details
Details for the file levdist-0.1.2-cp310-cp310-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp310-cp310-macosx_14_0_arm64.whl
- Upload date:
- Size: 14.6 kB
- Tags: CPython 3.10, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8149583d9c69495486a668c5fa9f1e3568ab9b2dec439bf1ad8fdd8ff0f56b98 |
|
MD5 | 6a9ae32dd172f27a6b2a4f64ed99f165 |
|
BLAKE2b-256 | 45fa7e5c0c56ac1404a3a6749477730f7c206c974ae9d05fe70489ac1eb53df1 |
File details
Details for the file levdist-0.1.2-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 14.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00700f79a765226c891c97024ed1194658ec6e9610e1b6de64ddadac7c06362e |
|
MD5 | d28062563e9e2aa273896c8080646000 |
|
BLAKE2b-256 | 909c8b814d6778bc632ef35661be9ca984b26cce8416cb4f243dba9c2102a23e |
File details
Details for the file levdist-0.1.2-cp39-cp39-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp39-cp39-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 46.4 kB
- Tags: CPython 3.9, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bd858b909e10dc4aa1f2c41e4a55ca04a6bef899939e7ff86e3130e5604fad2 |
|
MD5 | 56d73898633d985f67709d709e9827e1 |
|
BLAKE2b-256 | 20ee438a6a8d2bd7aa741799a621859d453de7e207b3df7aa9580d64511b0011 |
File details
Details for the file levdist-0.1.2-cp39-cp39-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp39-cp39-macosx_14_0_arm64.whl
- Upload date:
- Size: 14.6 kB
- Tags: CPython 3.9, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97ccadcc16ebe94d149f1fb2fb3d71f022719e0d8e168e3fa644eb088a30f803 |
|
MD5 | 0c5b0eafa40375ccd3780c3fd1993598 |
|
BLAKE2b-256 | 111da484bc32b2a9edabb297db29842eaec0fb27d4d36c13d17dd5e904d5030c |
File details
Details for the file levdist-0.1.2-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 14.0 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9e72e9b74e37bf262065ae94372d8bc72f92117e73a400efd93ed53a1cd8789 |
|
MD5 | cda80902804ddb05a7e710a4e8f1b0ce |
|
BLAKE2b-256 | d2c2f19689c1910b03c2369eb4bd397c8131cd30ae88c129bdad24399abddde3 |
File details
Details for the file levdist-0.1.2-cp38-cp38-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp38-cp38-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 47.0 kB
- Tags: CPython 3.8, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6cda051511c6d65fe3fb094cba7ee5801d9104a4abe5bcf7e137d2b04cb4116e |
|
MD5 | ab4cfc706cc13006277363833204559c |
|
BLAKE2b-256 | ff5a8872f7e78331a72ad4bfcff375de6d95554106f6621eadc5700b298eaaf5 |
File details
Details for the file levdist-0.1.2-cp38-cp38-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.1.2-cp38-cp38-macosx_14_0_arm64.whl
- Upload date:
- Size: 14.6 kB
- Tags: CPython 3.8, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f39e81b700c774b91f53ac675e067c904b0a8e05ee9cc138e9c7fd31f5c51bf2 |
|
MD5 | 6178344689ff35ab8b54e6a57d64b583 |
|
BLAKE2b-256 | 9b2a79fe0df26e704e0cff23a13a59d72a41b6482651424def628deebb664e60 |