> 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 https://github.com/bevacqua/fuzzysearch into Python.
Install
$ 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.
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.1
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.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / simple_fuzzysearch-0.0.1-py2.py3-none-any.whl
| Download URL | simple_fuzzysearch-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
891237233d5e6e74ec58c11428cc994edb2a42d180ec5bcb8fcedec99ebb1d32
|
|
BLAKE2b-256 checksum How to use checksums |
59f21024e88c50501cc435bac175da36f4a7c21b77d0455e9e49c1bdf00f4754
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |