Skip to main content

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

  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.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distributions

levdist-0.0.1-cp312-cp312-win_amd64.whl (10.3 kB view details)

Uploaded CPython 3.12 Windows x86-64

levdist-0.0.1-cp312-cp312-manylinux_2_35_x86_64.whl (13.5 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.35+ x86-64

levdist-0.0.1-cp312-cp312-macosx_14_0_arm64.whl (8.8 kB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

levdist-0.0.1-cp311-cp311-win_amd64.whl (10.3 kB view details)

Uploaded CPython 3.11 Windows x86-64

levdist-0.0.1-cp311-cp311-manylinux_2_35_x86_64.whl (13.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.35+ x86-64

levdist-0.0.1-cp311-cp311-macosx_14_0_arm64.whl (8.8 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

levdist-0.0.1-cp310-cp310-win_amd64.whl (10.3 kB view details)

Uploaded CPython 3.10 Windows x86-64

levdist-0.0.1-cp310-cp310-manylinux_2_35_x86_64.whl (13.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.35+ x86-64

levdist-0.0.1-cp310-cp310-macosx_14_0_arm64.whl (8.8 kB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

levdist-0.0.1-cp39-cp39-win_amd64.whl (10.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

levdist-0.0.1-cp39-cp39-manylinux_2_35_x86_64.whl (13.2 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.35+ x86-64

levdist-0.0.1-cp39-cp39-macosx_14_0_arm64.whl (8.8 kB view details)

Uploaded CPython 3.9 macOS 14.0+ ARM64

levdist-0.0.1-cp38-cp38-win_amd64.whl (10.3 kB view details)

Uploaded CPython 3.8 Windows x86-64

levdist-0.0.1-cp38-cp38-manylinux_2_35_x86_64.whl (13.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.35+ x86-64

levdist-0.0.1-cp38-cp38-macosx_14_0_arm64.whl (8.9 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for levdist-0.0.1.tar.gz
Algorithm Hash digest
SHA256 43cb82704a1a6341985b9ac4155bf05b50800fda859002d548217f30519d3dcd
MD5 c56c354a0c7cfc765a4067253f63cad4
BLAKE2b-256 4f4ea7aef936e771e0f43bb11917463c1ff8439e48be1b7543e9873d48048a32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.0.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 10.3 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.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 167a877ac31fc7603299da5e8f9269f8d4cbe17f0a07f7dc8ae8b5e373e3f2c4
MD5 052d98a20f94642207d2adf27e0eb521
BLAKE2b-256 776d819f2b47e0b2b3ffe81d7c61cf087e8a7df5d114c7bf2e91dec9c120b68a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 d3c36f0b8fb6b4539f20456743ceadcbda9ad02819d855912c48c09b52275cc7
MD5 8bf6d00d8baac4ba2dad62abd68179a8
BLAKE2b-256 0ec813234f7b10e7a6938a86c606e10efcd79d4fdfd5d2b87282956c58a6a71e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7a9d0abc4936f7734cb350f4b3b4b4b89715c718040df1dd5a35a5388936005a
MD5 a0899a87f513256fe8d96c0b8d1d5028
BLAKE2b-256 d6a8a4806bf1041a78f87bba34da00a6c548371edd81887baa28c6d325af1cb2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.0.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 10.3 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.0.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4a09e9593ad1094d06fc73f91c3adb832c0c5cab6f665d6ae59ba292a5326012
MD5 f0e1c8901f1bd6683b20ed8d952c5f54
BLAKE2b-256 810d564adbcbe371a5d1cb1e7f05bb5e589bc31dfa97e45cce88b11b3fc21da4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 f2d045e6385c5274b61f5c49e2531faaad7017762b857f4157ee6d78f9a93cf0
MD5 2ba186ad539ca094049f7c3b2731f5d8
BLAKE2b-256 8d6590b1d5dca85089b9327baccfbec3b6eff522bdd35f5d6dc45afee81ede83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 09c31c42aecd85e5d6d8160279a9857bccca5be280af58c309eb662322b37eec
MD5 e999bb7327b3325f34866103f41a2f86
BLAKE2b-256 cb0f5064657162bbbeccc035ee0ad14070829b01793205faafd36b09c57b02fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.0.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 10.3 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.0.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 43c5becb322b7f9a82f99842bcb748e354c10556ccd54cb8b0bb0867e10c52af
MD5 35024923e67699b398088376b360c801
BLAKE2b-256 0c5b2e38d6b454f225a4355571bc1fcf0b908fb2384706d847a96cc6bd7e6932

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 a760fb33950904954cc863008f609efa6e81d47f999c67fc7f8e4c24215451e0
MD5 1032b522af795d2d60302772c7e142d6
BLAKE2b-256 fe2351294ce012e371889d4156f6068961aac15b603f0f580030dca01355196f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 37e141d7e99aa2a3bdc14f149112b99c7e6ca26db49015f7c28a8edbce9604be
MD5 d3b755e8ed973dd3635be0d568581fad
BLAKE2b-256 083a46bdecbefc3846f2fde375e7dbcf2887b54bbde4c308ff9d9d8616de6ebf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.0.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 10.3 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.0.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 b8fec209082842a8286765a72b7002cc48378d91435dae2f656f51be9c1a3729
MD5 162cab179a0d23d987fa5e4473979f20
BLAKE2b-256 4cddc21641cbec17251588bf3c22854f332ae70ce9320d0cfd144577acf2d6b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 794ec6a05ce5d65c43cff2137aee5e5754d4629a3d244a5917c434fa4939058b
MD5 891535a4a07217ce6d14958807342250
BLAKE2b-256 c8ff9a63210a62c22c842e14f75ba8ed14dab5216b72d43cd414576415bb01f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e297165e41a7f924119a10752f2863f1dcbbe25ac52f2234949e6ad159d38832
MD5 86450cec47b9cb32cfdd55630be59c3a
BLAKE2b-256 3b9597da65a24a974ed03ee41a2e557af1319b8dbbd8a9c792091e69ecc6a320

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.0.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 10.3 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.0.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 03b99fa545c26acb7872f4ccc293d0530597534e066ffb543f246f8b93d53470
MD5 011a14c5cc13acd93b99f5eea0bf31f1
BLAKE2b-256 5a2512f4c994faa17308bed981a6aa7da7fe7371556479b86a82c92e5017a155

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 a553f386291c53bebb16d3e377b2c7d0d7cb124f1e3f6e1a62281690a6510624
MD5 a7e305bea5fd80eb6064924931d9b8b9
BLAKE2b-256 6a543a08b2ffd47316e24a367eb4fa2981667fe5db6c5b5c8bac62dedddc9eb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.0.1-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 8167b66184de7dc0639139126dd03db493103307404c9c662522eefc5363819f
MD5 8ae0db02f96a6397d8636badacde1de1
BLAKE2b-256 5e12421e276acead051b29621648c8ac821ae27402c924874655ca779bf04a65

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