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

Uploaded Source

Built Distributions

levdist-0.1.1-cp313-cp313-win_amd64.whl (13.9 kB view details)

Uploaded CPython 3.13 Windows x86-64

levdist-0.1.1-cp313-cp313-manylinux_2_39_x86_64.whl (49.4 kB view details)

Uploaded CPython 3.13 manylinux: glibc 2.39+ x86-64

levdist-0.1.1-cp313-cp313-macosx_14_0_arm64.whl (14.7 kB view details)

Uploaded CPython 3.13 macOS 14.0+ ARM64

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

Uploaded CPython 3.12 Windows x86-64

levdist-0.1.1-cp312-cp312-manylinux_2_39_x86_64.whl (49.4 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.12 macOS 14.0+ ARM64

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

Uploaded CPython 3.11 Windows x86-64

levdist-0.1.1-cp311-cp311-manylinux_2_39_x86_64.whl (49.3 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.11 macOS 14.0+ ARM64

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

Uploaded CPython 3.10 Windows x86-64

levdist-0.1.1-cp310-cp310-manylinux_2_39_x86_64.whl (46.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.10 macOS 14.0+ ARM64

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

Uploaded CPython 3.9 Windows x86-64

levdist-0.1.1-cp39-cp39-manylinux_2_39_x86_64.whl (46.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.9 macOS 14.0+ ARM64

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

Uploaded CPython 3.8 Windows x86-64

levdist-0.1.1-cp38-cp38-manylinux_2_39_x86_64.whl (47.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.39+ x86-64

levdist-0.1.1-cp38-cp38-macosx_14_0_arm64.whl (14.7 kB view details)

Uploaded CPython 3.8 macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: levdist-0.1.1.tar.gz
  • Upload date:
  • Size: 5.4 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.1.tar.gz
Algorithm Hash digest
SHA256 6eee0e20ec0ab9d56a7861a8f1fdb0cabfd3374345acba0887e0c37fff2eb920
MD5 2496efd4bb7acd72c6f92f2ebdedbaeb
BLAKE2b-256 a272168acba9b55df4c9e860514dbb25c327218a4cd63255b0c52e5647614678

See more details on using hashes here.

File details

Details for the file levdist-0.1.1-cp313-cp313-win_amd64.whl.

File metadata

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

File hashes

Hashes for levdist-0.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a75da50fc5a86219acf2b4614af4eacafedbd3a1c2e1d022010408cfd3a91259
MD5 1e7ed37aca359a71c85089d781e9c4d0
BLAKE2b-256 125a42d01e77c5d86afe73c1257702dd0c179aa0f06abf48b465f770c909328c

See more details on using hashes here.

File details

Details for the file levdist-0.1.1-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.1-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 b61b8fa14e98b6d6b1b836c98571997591aee25bfc168adad6c2970ca05d8067
MD5 40552e06775201af75ade489f3409828
BLAKE2b-256 9d1313e9c4473818917d229587fdd273bb9f1ad0abc821c4612514d78a589c2a

See more details on using hashes here.

File details

Details for the file levdist-0.1.1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for levdist-0.1.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5cdf2b92e421ca02e7a57cde853881302de87764965444cd29f8033f567075d3
MD5 2355504989de1f7f4d2cadcede754006
BLAKE2b-256 19899e6de9f719d12ab5f1ade124ffcd461a88f76dfefe69f12b09ff878ac57c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.1.1-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.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 eb0dec0e49b7213db29d7583c0dc25c187450b525ccdce438ecb4c148fb5b418
MD5 9f4e54d71e6a8fed2f3305526766349b
BLAKE2b-256 17c9cc6a766f86a2a35f36533be11e97a42cf3b7474cf4f4a3e028d774725b9b

See more details on using hashes here.

File details

Details for the file levdist-0.1.1-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 9ed10b07511d7a52e0759f2dd851a20c42e3bd8b339ca62c2690c6d7fae256ee
MD5 2813b3fcd0da9e262552296e0aa20df9
BLAKE2b-256 1a8804b65eff8ae660b33cb18fbf1a94b146fea7e391bd6f75519623cdb6efa0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.1.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f037f4dbcaf070005a34229a58213b218f18c078aeb032fc59eaa292d4a68015
MD5 07f69b75f0f44658496f15e4a3384bca
BLAKE2b-256 88bba384618cd667abeef9afb47a9094bd8bd6cc3775d1c64621b26a55d7b0cf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.1.1-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.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ef8cb03819e2553eb102fef62bb338a5a181c09bd3f1183d84bfec5f3f407093
MD5 a1ca2b9e1c36be9e8244e7531b1a02c4
BLAKE2b-256 ca6ab762286e4d5720aabffc487bee98da47333d59d32b18de788bf7cd2dac26

See more details on using hashes here.

File details

Details for the file levdist-0.1.1-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.1-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 d7c503a6c0a56e6eacd44845f97b4174bb6df21435aa35e5b7ed73287ef137eb
MD5 7283c9fac17c6746f1f7280a4c37e027
BLAKE2b-256 006f115b4c089db14b3c6447806c1b806f6486f05ff719222a0af48c437f626e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.1.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5090e7a66ca0699ac07b442735ff3778134621be72d60768e5f6c7613cf6d24a
MD5 f9f101b7a4e2ed9cc4d19ba12548a63e
BLAKE2b-256 bdc0ada9e7bc9a78d0c12a9312d03b2b37edbfd377856f00a65fe4a551497850

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.1.1-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.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 06a47fca6ac7259b1720f87b472409f99de86102912b4d92dfcc19283c445df2
MD5 60506ee876694ebf3540945d5c516ba5
BLAKE2b-256 6860314586e010ded3691383fdfde5c99d5d1e97c8748ded44259fd8ac1e10b0

See more details on using hashes here.

File details

Details for the file levdist-0.1.1-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.1-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 467cbf34016f0c3b53a20c9185d4cf92c0521a6b596142cf5fee4cb8ed3ec55a
MD5 3c8872fba33edb05e7249a06d5e23ab5
BLAKE2b-256 b8b562001ae204269530a14734dd3ba8fb72481fbb214671855d764c7015b41b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.1.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 143c17e0da7287d59831991441921cdfb294cd3b359b71c24d7d6223cadcc50e
MD5 9c64787b72cd2889fd7894c66fb597ff
BLAKE2b-256 66b7f105cfdef812825bd138dadb792bdf6fd12b44c4378562d3e0e414926e95

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.1.1-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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 899c6a8781d692ec3280b59b091a94a04bbec7f406aa80ed7be85ae51ae97f2e
MD5 377bdc1eb7ed6d22c7fa58b71c27f5ce
BLAKE2b-256 ae5f51c4811711d6f0ff69e2da4b7620c0b23b59138c191033a4d19ca93aafc8

See more details on using hashes here.

File details

Details for the file levdist-0.1.1-cp39-cp39-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.1-cp39-cp39-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c3ee39cb7a8aaffcab3d8d0995e6d8e1b4c7024109630f4d25d6ad77881dcfce
MD5 6de86b45b95ffbdb74f522dd163be487
BLAKE2b-256 f37f53215d52521a7ef7fcef4e08041255cca6677150bb0d5a8101b42474fb33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.1.1-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 838cccd961ed46a5522e13105a4e9d9904758bb0e6b5c88b3fbbabd9187553de
MD5 3ee1fb33a43e8f7d9ac79d9ca3b6cc4a
BLAKE2b-256 973e3541d1fde722a459fe50cb8e68374a5204f219003b41e9d44061ebda333b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: levdist-0.1.1-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.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 c693d9bff6f8972227f83fc49d2e2a898aea5f29cbf3589b16cae290c40af58c
MD5 589db9a9924e69bc2395eed13aace80e
BLAKE2b-256 1edc59f7bf8f334fd4f6bfdaf4c14f75d1aa437a6a572a63a44d1cd8acf23d8e

See more details on using hashes here.

File details

Details for the file levdist-0.1.1-cp38-cp38-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for levdist-0.1.1-cp38-cp38-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 8b710e0537d83f9fc2d8fbe5790251e44e73f302c84e9c173e58dfac986f352f
MD5 f7c623dba068b5b2edf3e5591cbeea5f
BLAKE2b-256 8f566dcdfc1af31511cd48149c07f5cdb6f19b4dddab5a791cb3d11391ed5cbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for levdist-0.1.1-cp38-cp38-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 0a0b4975b78ae19ce165edc87e144bfc9891464a2573285ca4cf684195daf8d4
MD5 614ebece2981e42b5fffdc4c40b0a7bd
BLAKE2b-256 a38f59997000c9a7979df7cc319c1c19c22b0a023889e673f8d1d00cab9d6daa

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