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.0.2.tar.gz
.
File metadata
- Download URL: levdist-0.0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41232be32fe5d3301d7977d607c65c7beb109de4b7badb85203fffd4a4288b65 |
|
MD5 | 7c033102f1adfc1cbb12c9a906cf05cc |
|
BLAKE2b-256 | 4b1b83d64f8f91999ebeedd8bd64ecd01564eadb3ff6f45430ff915bcf5f9291 |
File details
Details for the file levdist-0.0.2-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 11.0 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 586fa415d04d44be69bcd9fa78bef3c18c95841adda757209840f218191702ae |
|
MD5 | eea68b66f2b29764579ba25c9fc91155 |
|
BLAKE2b-256 | 4ebaf2f558f46dc452fccaaa13e1b44bd4af806911b70f52d6ed1d8d9db58d45 |
File details
Details for the file levdist-0.0.2-cp312-cp312-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp312-cp312-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 14.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca88de8e01f3b34c1b9b00b162510a3fa6aec726279c0e94210146d008e73166 |
|
MD5 | 2a7f5736e7758cd1c3576df4eeb6ad9b |
|
BLAKE2b-256 | 212c67e4ee042d2b60e51aba8cb27ed0543925978efce9cc5ad53b7f68cecc74 |
File details
Details for the file levdist-0.0.2-cp312-cp312-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp312-cp312-macosx_14_0_arm64.whl
- Upload date:
- Size: 9.5 kB
- Tags: CPython 3.12, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9482bcda16ff1c746134fe2783993c4bc993b7221cf645ccc544869f050cd843 |
|
MD5 | 7b4d30c333a5dc65b569231a2354202f |
|
BLAKE2b-256 | 747b390f1d9cb98c3c30c3172381520a374b784595e8ee4c50f99d34607a75ee |
File details
Details for the file levdist-0.0.2-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 11.0 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f4b2ca93482e5b197f7f46e5fb0430ba08859f142aec66daafd6bfa44dd7787 |
|
MD5 | ad7869b4a8d50d3511e50cd90372a6a2 |
|
BLAKE2b-256 | afc53e3f6402b42d009c9749c04e9f704721ab8531b1999f036592aa0fdcd3a9 |
File details
Details for the file levdist-0.0.2-cp311-cp311-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp311-cp311-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 14.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c3edba7c748262e8a0dabba7093722a6482bf883c59b5c7760dd63c7b5a2e41 |
|
MD5 | bdff5c0d7d4ec78a86ae870f9dddddee |
|
BLAKE2b-256 | e1ad7b8ce665215dc38e4a9d1b3fff662215dc9d3e0ade709ef2ebfad41be682 |
File details
Details for the file levdist-0.0.2-cp311-cp311-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp311-cp311-macosx_14_0_arm64.whl
- Upload date:
- Size: 9.5 kB
- Tags: CPython 3.11, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2eb795e25cfc1cd26bbc2e1c7f4911b51a08bed924db4b08ea921fd8e1df139b |
|
MD5 | 4a19c2f6d9a433dd3122649a2d2c4a52 |
|
BLAKE2b-256 | 0deec670116ba672e0fa1b70d74c8269b24a934ba9e298a9fe31785593d2c00c |
File details
Details for the file levdist-0.0.2-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 11.0 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf9a44a8d0d37e14873d3402b3d574429e6bc07257185c6d160b935c3270c1dd |
|
MD5 | fdd6586824ceff0900130a572db3df3f |
|
BLAKE2b-256 | ac7c0f27812fb1d2fa56eb10bd716122866b8415fec5576e739673aa0a3e8422 |
File details
Details for the file levdist-0.0.2-cp310-cp310-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp310-cp310-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 14.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e9293febdf45373f93c4b0fee8363311176bb06dee90ceee5e5abdea57611bf |
|
MD5 | 42e24c3dbe672fe923fb44d75365abed |
|
BLAKE2b-256 | a031074fbc668ef48f72355598b0665e7b83a476b9bb083b21e3a7fc19fa8c9d |
File details
Details for the file levdist-0.0.2-cp310-cp310-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp310-cp310-macosx_14_0_arm64.whl
- Upload date:
- Size: 9.5 kB
- Tags: CPython 3.10, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | faf11ded1c8e340c010eecf8857a0dce6a1f794f0876c2432d6e3fc843414d73 |
|
MD5 | be3e5d7f75e44aa91f67c62073d59c35 |
|
BLAKE2b-256 | 783e2ea4e60c14308deb18de081a5779cda4e921d325ca307e269842d178b132 |
File details
Details for the file levdist-0.0.2-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 11.0 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4829a85750e0f9bdf6c154ae9b69d1852d2222e6c8ea4da3ea816b54ca40e174 |
|
MD5 | 3fbb28564d540d493302ebea7c42f9c4 |
|
BLAKE2b-256 | aece293046de2c3274b3cbf58787b6770e9abea87dd0df996f35a493157e2209 |
File details
Details for the file levdist-0.0.2-cp39-cp39-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp39-cp39-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 13.9 kB
- Tags: CPython 3.9, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 152b11c9c06220952436a0868ddac6cc81fd0f163afe82f9de530c6410750c85 |
|
MD5 | 794a3aed37feeef11a4c50237c4e8323 |
|
BLAKE2b-256 | cb484b76ae9fb7addfa495eb84fceae367f2d0d563c28bab8c7f799221503577 |
File details
Details for the file levdist-0.0.2-cp39-cp39-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp39-cp39-macosx_14_0_arm64.whl
- Upload date:
- Size: 9.5 kB
- Tags: CPython 3.9, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8693164edaa4ccc4c9f7f8171a187587af648b4c49d0695f7d6c2b09b0663a29 |
|
MD5 | 3d2d64276b99fc326a273342e23c3afb |
|
BLAKE2b-256 | e71f3b264e727b8dea58459f45269f3954494ddc2acc67e24bd657b7143dff26 |
File details
Details for the file levdist-0.0.2-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 11.0 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aed3e2e216894c6efc481418c9b4bfeb3aa21fffed1751e60b330cbfcc23944d |
|
MD5 | 6e85d73c0cf8cd8834a2470504ec47ff |
|
BLAKE2b-256 | ce5acce63a96273838b451aea763b53c2f4b762994abed520198bf0f324f807e |
File details
Details for the file levdist-0.0.2-cp38-cp38-manylinux_2_35_x86_64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp38-cp38-manylinux_2_35_x86_64.whl
- Upload date:
- Size: 14.4 kB
- Tags: CPython 3.8, manylinux: glibc 2.35+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9036c505d8cda5f13097011498a9b6c93f25e448114f652ffe8c69766b373e1c |
|
MD5 | 5e151a878e43300f1c17e7f9d7c577b9 |
|
BLAKE2b-256 | 5cde97def3a3c523d5ec50dfcc49487f63fc0514058b880da70e03842c5545dc |
File details
Details for the file levdist-0.0.2-cp38-cp38-macosx_14_0_arm64.whl
.
File metadata
- Download URL: levdist-0.0.2-cp38-cp38-macosx_14_0_arm64.whl
- Upload date:
- Size: 9.6 kB
- Tags: CPython 3.8, macOS 14.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 814688b3161e8b7e23ec17d7a42eef3bfa1c33ce54037d2f8c66a0e0d36980ef |
|
MD5 | b80083bd52d533499af1665bc2e58fb2 |
|
BLAKE2b-256 | 750fa2b66d8910beb3577a5705ff540b275a6a269fe3fc85c8809f8a825d2e95 |