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.

Files for fuzzyfinder, version 2.1.0
Filename, size File type Python version Upload date Hashes
Filename, size fuzzyfinder-2.1.0-py2.py3-none-any.whl (4.8 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size fuzzyfinder-2.1.0.tar.gz (13.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page