Tiny and blazing-fast fuzzy search in Python.
Fuzzy searching allows for flexibly matching a string with partial input, useful for filtering data very quickly based on lightweight user input.
Port of fuzzysearch in JavaScript into Python.
Install
Just install using pip:
$ pip install simple-fuzzysearch
fuzzysearch(needle, haystack)
Returns true if needle matches haystack using a fuzzy-searching algorithm. Note that this program doesn’t implement levenshtein distance, but rather a simplified version where there’s no approximation. The method will return true only if each character in the needle can be found in the haystack and occurs after the preceding matches.
from fuzzysearch import fuzzysearch
fuzzysearch('twl', 'cartwheel') # <- true
fuzzysearch('cart', 'cartwheel') # <- true
fuzzysearch('cw', 'cartwheel') # <- true
fuzzysearch('ee', 'cartwheel') # <- true
fuzzysearch('art', 'cartwheel') # <- true
fuzzysearch('eeel', 'cartwheel') # <- false
fuzzysearch('dog', 'cartwheel') # <- false
License
MIT
Metadata
Release files for simple-fuzzysearch 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| simple_fuzzysearch-0.0.5-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / simple_fuzzysearch-0.0.5-py2.py3-none-any.whl
| Download URL | simple_fuzzysearch-0.0.5-py2.py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7b772ae4baf873aa5be468e01ba16af764be118c1fa135f6161b3d349f3ed0e3
|
|
BLAKE2b-256 checksum How to use checksums |
56c97ba251409955fb21e868f6595e129b5c8b95a8be421c5d85bb36606509f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for simple-fuzzysearch 0.0.5
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.