Skip to main content

CI PyPI

tinyalign

A small Python module providing edit distance (aka Levenshtein distance, that is, counting insertions, deletions and substitutions) and Hamming distance computation.

Its main purpose is to speed up computation of edit distance by allowing to specify a maximum number of differences maxdiff (banding). If that parameter is provided, the returned edit distance is anly accurate up to maxdiff. That is, if the actual edit distance is higher than maxdiff, a value larger than maxdiff is returned, but not necessarily the actual edit distance.

For computing regular edit distances or if your maxdiff is less than 4, you should prefer https://github.com/fujimotos/polyleven, as that is faster in that case. When maxdiff is 4 or more, but not too close to the length of the shortest string, this module is faster.

>>> from tinyalign import edit_distance, hamming_distance
>>> edit_distance("banana", "ananas")
2
>>> hamming_distance("hello", "yello")
1
>>> edit_distance("hello", "world", maxdiff=2)
3

Changes

v0.3.0

  • Ported the extension module from Cython to Rust using PyO3

v0.2.2

  • Added type hints

Metadata

Release files for tinyalign 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tinyalign 0.3.0
File Size Uploaded Provenance Actions
tinyalign-0.3.0.tar.gz 6.8 kB Without provenance Details for tinyalign-0.3.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tinyalign 0.3.0
File Actions
tinyalign-0.3.0-cp315-cp315t-manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 free-threading Linux glibc 2.28+ x86-64 Details for tinyalign-0.3.0-cp315-cp315t-manylinux_2_28_x86_64.whl
tinyalign-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.28+ x86-64 Details for tinyalign-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl
tinyalign-0.3.0-cp314-cp314t-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 Details for tinyalign-0.3.0-cp314-cp314t-manylinux_2_28_x86_64.whl
tinyalign-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details for tinyalign-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl
tinyalign-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for tinyalign-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
tinyalign-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for tinyalign-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
tinyalign-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for tinyalign-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl

Total release size: 1.2 MB

Release files / tinyalign-0.3.0.tar.gz

Download URL tinyalign-0.3.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
1c8e418bf10d961f9661ff7bedc1555643210e14b318550bbd36072032d204e5
BLAKE2b-256 checksum
How to use checksums
39fefd27aafe2dc708c019119b91b31df168170841519e7da88b5a4517355110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tinyalign-0.3.0-cp315-cp315t-manylinux_2_28_x86_64.whl

Download URL tinyalign-0.3.0-cp315-cp315t-manylinux_2_28_x86_64.whl
Size 174.0 kB
Tags CPython 3.15 CPython 3.15 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3a3c50facc90e36ae2b8f36721deeb99438c7e723e9e39124477a19cb53337d8
BLAKE2b-256 checksum
How to use checksums
dc642e5da6a8699c25cd1186c3718cc830d5c28339d4edb43a45fac384dbbff6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tinyalign-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl

Download URL tinyalign-0.3.0-cp315-cp315-manylinux_2_28_x86_64.whl
Size 173.6 kB
Tags CPython 3.15 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ba83119db8e0fa6389c16c881916efd265e43575ef3d61d71e1326a0dd203b03
BLAKE2b-256 checksum
How to use checksums
47cc089c9dbb956ef52d73f3ce89f15fbddfae8e5d510b26545f5af2bd4c7647
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tinyalign-0.3.0-cp314-cp314t-manylinux_2_28_x86_64.whl

Download URL tinyalign-0.3.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Size 173.8 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
d1cd1f51f8331ec6587829ececb1f9e3476dd640c9d6c35359e25ff16da6458b
BLAKE2b-256 checksum
How to use checksums
3287041a1f797ed779b47e09b6ea953ad54cae26b7846e8a8b92922f0887a355
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tinyalign-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL tinyalign-0.3.0-cp314-cp314-manylinux_2_28_x86_64.whl
Size 173.5 kB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ededcc1dd008569e2e75a89b13c81ed05c328559ea173459ca3715e906ee8861
BLAKE2b-256 checksum
How to use checksums
3ddc690904dba4e42c8fb52656fcafeb12e948328864185d84b00428fb3c90ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tinyalign-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL tinyalign-0.3.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 173.1 kB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
bdad3cd2ab96363925743536d6281e8bdb33238e7d8ccfefc5b3005e4bff6ded
BLAKE2b-256 checksum
How to use checksums
479f37fb54b3a08ef53543ae6429e34db05e75e4a08afbf2cabd4639798046e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tinyalign-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL tinyalign-0.3.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 173.1 kB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2eb9f7f100850f4d02c693bb9b02d896e4fdc11cd411f73752882b299db8d7c5
BLAKE2b-256 checksum
How to use checksums
e6716cec5b1706e3236d878f524aaaccab2012bfca0a4ae18fb256c162f9f0b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tinyalign-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL tinyalign-0.3.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 174.3 kB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
de395c4d8319535f7b4f733d6b916107c9da4ff79b6714f1397b0326a224476a
BLAKE2b-256 checksum
How to use checksums
91e22cab96ac6e10168c004f23e468e42d4f9274e928e510c31370977689089e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for tinyalign 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page