Skip to main content

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.

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.4

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

Built distribution (wheel)

Table of built distributions (wheels) for simple-fuzzysearch 0.0.4
File Interpreter ABI Platform
simple_fuzzysearch-0.0.4-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / simple_fuzzysearch-0.0.4-py2.py3-none-any.whl

Download URL simple_fuzzysearch-0.0.4-py2.py3-none-any.whl
Size 3.6 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
2ad0a389395eb20f5aa5b22420d3cc2c2ead1b43c4eb35d6f0fb5c9ee90b3cf5
BLAKE2b-256 checksum
How to use checksums
1b85c91cbf64ee1c6ef2b51b3bf2913a241acf4d0cb80df51b54d153001f3be7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.0.5

1 release file

This release

0.0.4 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

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