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.

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

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)

Table of built distributions (wheels) for simple-fuzzysearch 0.0.5
File Interpreter ABI Platform
simple_fuzzysearch-0.0.5-py2.py3-none-any.whl Python 2, Python 3 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

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

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