Python library for fast fuzzy search over a big file written in Rust
Project description
Python library for fast fuzzy search over a big file written in Rust
Table of Contents
About The Project
Fastzy is a library written in Rust that can search through a file looking for text based on its distance (Levenshtein). For measuring the Levenshtein distance, the library uses mbleven's algorithm. In situations where the requested distance exceeds 3, where mbleven is slower, Wagner-Fischer is used instead of mbleven. This library loads the whole file into memory, and creates a lightweight index based on the length of the lines. The result is that only potential lines are looked up, opposed to a large number of lines.
Built With
Performance
Library | Function | Time |
---|---|---|
polyleven | polyleven.levenshtein('text') | 8.48s |
fastzy | fastzy.search('text) | 0.003s |
Installation
pip3 install fastzy
Usage
import fastzy
# open a file and index it in memory
searcher = fastzy.Searcher(
file_path='input_text_file.txt',
separator='',
)
# search for the input text 'text' with the distance of 1
searcher.search(
pattern='text',
max_distance=1,
)
['test', 'texts', 'next']
License
Distributed under the MIT License. See LICENSE
for more information.
Contact
Gal Ben David - gal@intsights.com
Project Link: https://github.com/Intsights/fastzy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file fastzy-0.5.1-cp311-none-win_amd64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp311-none-win_amd64.whl
- Upload date:
- Size: 152.2 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2aab68af85181e15bfe67377ce077b800b1ed7ccab978c3587cfd61694d90a6a |
|
MD5 | 19c4e11eb14844809b21a7ce37a12d15 |
|
BLAKE2b-256 | b7a1bd1e4eb2f528b6ec95f53bc4b9a33a8db4c932148dfacda99b0fbeb3c67a |
File details
Details for the file fastzy-0.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 250.7 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38e0ff430a09bae1ca7ee509b67a2a08a509f0971486fe00f2cb5f9ac4cf6fe5 |
|
MD5 | bce04ff22807c5dae8fed70732252168 |
|
BLAKE2b-256 | fd10f6a691ee99cc4c31e280a07a873668da98042355983cc8f957de5b90a84b |
File details
Details for the file fastzy-0.5.1-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 204.0 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8876b7490cf029b3a6fce8481640c1eeafd9370d79c5db0f264f5bd75de0ee6c |
|
MD5 | 49c7207744004d4a10f518f83cef0c23 |
|
BLAKE2b-256 | beed1def91b33d4f30ed765e8a1af58754c7cd2ea28de3b773703eb7f18c3caf |
File details
Details for the file fastzy-0.5.1-cp311-cp311-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp311-cp311-macosx_10_7_x86_64.whl
- Upload date:
- Size: 220.4 kB
- Tags: CPython 3.11, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22e857cda94db4e85617005d761e55b70f18e66978c29756e5ba8a5053b2a353 |
|
MD5 | 58238f8a74fe8b0b2bb292993f51c904 |
|
BLAKE2b-256 | 0dc0e55de157c8528f7cd484dd2b7d79c5290df51b8bdd35f8f77af8017ab5e3 |
File details
Details for the file fastzy-0.5.1-cp310-none-win_amd64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp310-none-win_amd64.whl
- Upload date:
- Size: 152.2 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cd0893b16686d536b39d469e54425bd75b01223784d9e7608e0f6ba32a61e8f |
|
MD5 | 8d2c8615e0c810399516f39f472484ca |
|
BLAKE2b-256 | 135fe0f3caa5bf2bcc8d665bd8de3c5a7b5c5d46e050fa649010c00d23408385 |
File details
Details for the file fastzy-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 250.7 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e60697963f0b2886995e54e91df02fa25c554ded2152ea2f3de799f78838780 |
|
MD5 | 5a5f15efd27b4bdd2ae1bb5ba3e44b48 |
|
BLAKE2b-256 | 7e8505826b44c50b079579c08cbcd48aca466ec480d731a2bb96f71e185094cc |
File details
Details for the file fastzy-0.5.1-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 204.0 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84518ff8322a9c77ac14686e845186270a0c0be758a6d925f9527b855a51d5d2 |
|
MD5 | d24b7d3c5711c5783132ffa61ba7a87b |
|
BLAKE2b-256 | 8f0f313666d905d31145db61ecf3f3c465286a4c2539cb02e6c092452ac44047 |
File details
Details for the file fastzy-0.5.1-cp310-cp310-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp310-cp310-macosx_10_7_x86_64.whl
- Upload date:
- Size: 220.4 kB
- Tags: CPython 3.10, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fafcd40708e7b58c4aed32004847307f1eba785820c3bdbbd8a515379d2e973 |
|
MD5 | 935d77bfc291d34207f9555af4c63c51 |
|
BLAKE2b-256 | e4d66a22c8a2fb522e2e21afcb57386b373137565fa9e2b9364e34b71ebcbfab |
File details
Details for the file fastzy-0.5.1-cp39-none-win_amd64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp39-none-win_amd64.whl
- Upload date:
- Size: 152.3 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2773783a07724d8404f035d608f705fdbaaf04149c864fe104a2ff62d5506d96 |
|
MD5 | fb6594b2313d26290f57575b013fcd0c |
|
BLAKE2b-256 | 9bf2541902b5559d60b540bd1c902f4345f65eac9152f388e7f033539bb0f944 |
File details
Details for the file fastzy-0.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 250.8 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0324f07e6e773f0dc49a71f4d81f7e9f903c379fb69a9da9ba31107369ce9c3d |
|
MD5 | 7007318fa718f6b981662673a97ce97e |
|
BLAKE2b-256 | 44457b3cd490df0016219878fb84679cf1d63c60dda5dee7afb3d2e8c75c5018 |
File details
Details for the file fastzy-0.5.1-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 204.1 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 926829ac89bfea734cd3479bf1edb867aeb38e22e3dd47af742d897341c6c9cb |
|
MD5 | 369a55b502365570af0da7101fc21fd9 |
|
BLAKE2b-256 | b35f7cf3a61b9a76af943904dc6df3616619a3b1ee5a5a70974b67c19088108c |
File details
Details for the file fastzy-0.5.1-cp39-cp39-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp39-cp39-macosx_10_7_x86_64.whl
- Upload date:
- Size: 220.4 kB
- Tags: CPython 3.9, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6606ee8542d32bbb58ad071495ff1aea09d6a56bb722e7be46ba6b4103570fb7 |
|
MD5 | 8e7bbd13a1da4775e003d1d1fa28505c |
|
BLAKE2b-256 | dc14f219dc1dbc3db761c255a66c714f43d675c0c57e787b7462721db6c45241 |
File details
Details for the file fastzy-0.5.1-cp38-none-win_amd64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp38-none-win_amd64.whl
- Upload date:
- Size: 152.0 kB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2ecd26311034e6caea1acb3a661e116ce7cc246a84e91687d12be88243f02cf |
|
MD5 | cad75a6b1fc491c25970e72acdf5ec22 |
|
BLAKE2b-256 | f1de13eac7b765d5033e19358809bb05ad9203a5e6a34cb7f79092d3310326d3 |
File details
Details for the file fastzy-0.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 250.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39f791bc43b0f3b1f98f88082378b966102e0d6ee55df821b57cd1f6b87af635 |
|
MD5 | dcf8da1b343203e95347019b2e4b940b |
|
BLAKE2b-256 | 42fc2a084b5cfa64dd1feabf0d25cd95791094a46bc9a78e25eda4a6682db194 |
File details
Details for the file fastzy-0.5.1-cp38-cp38-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp38-cp38-macosx_11_0_arm64.whl
- Upload date:
- Size: 204.1 kB
- Tags: CPython 3.8, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ca8e7904d8e609fd7cc6572ea2c1d4618133881a1bdd5cba6534da0a175d54e |
|
MD5 | 21721c30cbf053811047488c31d16139 |
|
BLAKE2b-256 | 4dafb182e214a3fbe3e631591906ac8d52f77bf288b79b1d893c0656da21e528 |
File details
Details for the file fastzy-0.5.1-cp38-cp38-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp38-cp38-macosx_10_7_x86_64.whl
- Upload date:
- Size: 220.8 kB
- Tags: CPython 3.8, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0900ef740e76ebcd649780a52588fc1ef9a242225f05e98cf31d321378b5596 |
|
MD5 | 96cca84f610d97c511768eed230b618d |
|
BLAKE2b-256 | a6068ceee147c6949c49f961a5cdf8e213e6fa565e0a99f136f8c4192017e032 |
File details
Details for the file fastzy-0.5.1-cp37-none-win_amd64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp37-none-win_amd64.whl
- Upload date:
- Size: 152.0 kB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1ca0a53f2c974260b51377365e487da05ad30736156d8c053af6acc6fe075b0 |
|
MD5 | 080caaf574a7bf0bd2e06d3899e5cf27 |
|
BLAKE2b-256 | e7ff9ca500eb61bd82dec7ea0a1e59962cb4126575f1dbb78b510164f92c1698 |
File details
Details for the file fastzy-0.5.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 250.7 kB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0b84f997dd2c725229412ef139ddb7d902588f017113940f6311dcbd4cd7e1 |
|
MD5 | 624389146098b50ffa7531000c6b84d4 |
|
BLAKE2b-256 | 707d1602d065c4299e10a7e0c33fa9503a10deac3907357b74aae1286d8086ab |
File details
Details for the file fastzy-0.5.1-cp37-cp37m-macosx_11_0_arm64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp37-cp37m-macosx_11_0_arm64.whl
- Upload date:
- Size: 204.1 kB
- Tags: CPython 3.7m, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7eb344df7a02c3a4f94eeb74110a4ec1e636bb01f611570fb6201759d85092fd |
|
MD5 | 4df8cd795ecc57579665f2455e43747e |
|
BLAKE2b-256 | e953b4521f27d546de2be0b7e2deb968f5ac0733051aa012f89d8a5fa360ae17 |
File details
Details for the file fastzy-0.5.1-cp37-cp37m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: fastzy-0.5.1-cp37-cp37m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 220.8 kB
- Tags: CPython 3.7m, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e64fa038b0425140a8e7039c6f6f0eccb019748c8d45662a6ed39232e6672f48 |
|
MD5 | 712d4eaa2105c2c1e1c758d800323ec4 |
|
BLAKE2b-256 | a30dbfc3caf0ae5eb599d31900277aaaf3ef191574814a0cf299a3e2b7105be3 |