Skip to main content

Package to calculate the Levenstein distance

Project description

levdist

PyPI - Python Version PyPI version PyPI - Downloads

CI codecov

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

  1. Install PDM using this documentation
  2. Install development dependencies pdm install
  3. Install pre-commit hooks pre-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

levdist-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distributions

levdist-0.1.0-cp312-cp312-win_amd64.whl (13.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

levdist-0.1.0-cp312-cp312-manylinux_2_35_x86_64.whl (49.8 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.35+ x86-64

levdist-0.1.0-cp312-cp312-macosx_14_0_arm64.whl (14.7 kB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

levdist-0.1.0-cp311-cp311-win_amd64.whl (13.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

levdist-0.1.0-cp311-cp311-manylinux_2_35_x86_64.whl (49.6 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.35+ x86-64

levdist-0.1.0-cp311-cp311-macosx_14_0_arm64.whl (14.7 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

levdist-0.1.0-cp310-cp310-win_amd64.whl (14.0 kB view details)

Uploaded CPython 3.10 Windows x86-64

levdist-0.1.0-cp310-cp310-manylinux_2_35_x86_64.whl (46.6 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.35+ x86-64

levdist-0.1.0-cp310-cp310-macosx_14_0_arm64.whl (14.7 kB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

levdist-0.1.0-cp39-cp39-win_amd64.whl (14.0 kB view details)

Uploaded CPython 3.9 Windows x86-64

levdist-0.1.0-cp39-cp39-manylinux_2_35_x86_64.whl (46.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.35+ x86-64

levdist-0.1.0-cp39-cp39-macosx_14_0_arm64.whl (14.7 kB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

levdist-0.1.0-cp38-cp38-win_amd64.whl (14.0 kB view details)

Uploaded CPython 3.8 Windows x86-64

levdist-0.1.0-cp38-cp38-manylinux_2_35_x86_64.whl (47.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.35+ x86-64

levdist-0.1.0-cp38-cp38-macosx_14_0_arm64.whl (14.6 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

File details

Details for the file levdist-0.1.0.tar.gz.

File metadata

  • Download URL: levdist-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.18

File hashes

Hashes for levdist-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1d9cd59b2de984ebf58eac2ab36eb7bd8adbb6d17f1b3e155b8fc303b07e7eea
MD5 cee08f4a0ba9f55c1b263d6d6530a8da
BLAKE2b-256 df92edd9ade89f07e42ff8c25349fb2638de0e67dd246165c80527fac6687738

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: levdist-0.1.0-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.8.18

File hashes

Hashes for levdist-0.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 5b1f759acdbe45bc7b7f04c40919316563b6cbe7fc2c488a6f6d230cc23dcb54
MD5 3373c8eb49d1a76fe85c076e1bd68483
BLAKE2b-256 90f7df036c664b360ae1b497129f224254e093885ca37e04cdc7d778e424a22d

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 f9800246d58303a521fad3ac7d38bdf18bbbc9eedc0593a0284d8f7e93ac63cd
MD5 b6d09ac16617492389adbb2e5d9b3bbb
BLAKE2b-256 63a8a4465c2e0bec517e55eaff494b891e86a1bb0776dcd7abc30b9838da0a8c

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 c33b1008e8ff4bfcf8183e2ae9c79f0f6870590994f4696e9c08d3d595263e15
MD5 c3b4fa68a3e130929d2651a9e9e9e30d
BLAKE2b-256 bab07b5782b802630f83aa93649374c5651d7f7a7e0f72d88648abe45a48cfd1

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: levdist-0.1.0-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.8.18

File hashes

Hashes for levdist-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 955fbbc6fe76984abebc450713128e52eb058c345973a740415f3adeda15866a
MD5 25a63848f7728788bd13c756bef5d5f8
BLAKE2b-256 6ec51d69ca25dbfa4aaee81a365b14ffe1ba6ba01b6df7a51b1331febd637648

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 389721ebe994cf03a619824a00b48b2c3c1def4e7374889bde85db0ba085d5f8
MD5 d4b517ab968186cc1a452237ba793df1
BLAKE2b-256 59348637279017bd7cd3c4b0004f266bab1ef8ee721a71052014f6b49f572459

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 582dbdd2761f3e781d5ac6eec5ca5130c146f7d8a0eb30f279c5224424a73dc8
MD5 3f6e359f72280cb4ce83c39024c53d6c
BLAKE2b-256 6a28b98b6e7961ece62f6e7b401de08e2686f2e0f202c2de7403360a8363eec8

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: levdist-0.1.0-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.8.18

File hashes

Hashes for levdist-0.1.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 3bf069525b51a6b310adc4d72b6b44fc9494a6eafbc28a6380c9de74d469f92b
MD5 12aef3df24fc0ddab294b446293b1d2e
BLAKE2b-256 753005dc3e765807593b3afa6c00e96844a41b18cb04bf52cba4e1dbeffcb908

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp310-cp310-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 777fce791265531477c616e06805fc0962589bd4572f3e2c6c46ca1e43efbc8e
MD5 9c7557964e05691f6b65e92c51835574
BLAKE2b-256 b5793240b9d5def29c2c0d255a24d17b4825fb35ea700a6f7c1a6488ce961a99

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4e410e083d686a2e73d7b42b5f647d44006bd90f8e4e9579128d4ddcf24c7bab
MD5 2f7c8ea7ed75f2f4a9a6850d8d4338cd
BLAKE2b-256 f1be76cc281547e81c29147ca1bb3fbce1e7cbac1d60ec1ae8523d82e248ca47

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: levdist-0.1.0-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.8.18

File hashes

Hashes for levdist-0.1.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 155520b6277a57588481e6a5e07decc2d5d1c0aff16dfb1d9f1527d8f8416e1d
MD5 f0de54d20a6f5f5abc5125b8f545af2d
BLAKE2b-256 a73ef9a67e6671d6ed72cde610e1596aef62c43edea560b929f9d819a3a995ea

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp39-cp39-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 90d7b30693e01712dbc386325ebc006dc41061ff9e621ca78165335b84c3a338
MD5 635e0616bd0e0d474e9f63d0264ad518
BLAKE2b-256 bdcb309cb4dbd3c994f64212ecfe899ff90c4b01a80ebbec51d57404b49d1299

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 47c4d0760cbdaa50ca65ea750273801181f6d27393c77b54083e5afa7c77a91a
MD5 2bb8852cc5f7c59ab15ced469aa18c82
BLAKE2b-256 3cf311ebb2ce059eb751f5d827a06490d5f777a4548bb26887f6605b32b59ada

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: levdist-0.1.0-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.8.18

File hashes

Hashes for levdist-0.1.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 3b4cf2c25a98adf7177a50a2d92642415c975c1e3e47defa110901f12d3dd200
MD5 0256a80e9f97fab0540e27398fe54e62
BLAKE2b-256 ff4170281cd57dec5d7d28f5ca3ffe6530e6c7de9ac4a36d61f749afed4af09d

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp38-cp38-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 1b7f24060c77c4832e90ec8e08ddd21b225263e8ce15fa33db0fd88985bf92ab
MD5 fab453c74a75eb228d659b8e47ac7193
BLAKE2b-256 d76984fb734e4c11f741bd0b15af721c0c63a563a4bf6d3da1f83ea9196e0333

See more details on using hashes here.

File details

Details for the file levdist-0.1.0-cp38-cp38-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for levdist-0.1.0-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0e9cc6a270a413def15a3651374bf20cf94e5ad984e47ddcc7d7f89f396760b0
MD5 a2597946c595ec6def471f9436214cec
BLAKE2b-256 68d36ec048b666ab24b01c2e361fe0d291efb0b563a582c4dd96c438cab334ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page