Skip to main content

Fuzzy Finder implemented in Python.

Project description

https://img.shields.io/travis/amjith/fuzzyfinder.svg https://img.shields.io/pypi/v/fuzzyfinder.svg

Fuzzy Finder implemented in Python. Matches partial string entries from a list of strings. Works similar to fuzzy finder in SublimeText and Vim’s Ctrl-P plugin.

https://raw.githubusercontent.com/amjith/fuzzyfinder/master/screenshots/pgcli-fuzzy.gif

Quick Start

$ pip install fuzzyfinder

or

$ easy_install fuzzyfinder

Usage

>>> from fuzzyfinder import fuzzyfinder

>>> suggestions = fuzzyfinder('abc', ['abcd', 'defabca', 'aagbec', 'xyz', 'qux'])

>>> list(suggestions)
['abcd', 'defabca', 'aagbec']

Features

  • Simple, easy to understand code.
  • No external dependencies, just the python std lib.

How does it work

Blog post describing the algorithm: http://blog.amjith.com/fuzzyfinder-in-10-lines-of-python

Similar Projects

Changelog

2.0.0 (2017-01-25)

  • Case insensitive matching. (Gokul Soumya)
  • Add an accessor function for fuzzy find. (Amjith)
  • Support integer inputs. (Matheus)

2.1.0 (2017-01-25)

  • Use lookahead regex to find shortest match. (Gokul Soumya)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fuzzyfinder-2.1.0.tar.gz (13.3 kB view hashes)

Uploaded source

Built Distribution

fuzzyfinder-2.1.0-py2.py3-none-any.whl (4.8 kB view hashes)

Uploaded 2 7

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page