skillfed

pfzy

Python port of the fzy fuzzy string matching algorithm

pfzy v0.3.4 16.6M downloads/30d#1,147 on PyPI12
Permissive license MIT Abandoned released

What it is and what it does

pfzy is a Python port of the fzy fuzzy string matching algorithm, designed to find and score string matches while also returning the indices of matched characters. Unlike some other fuzzy matching libraries, it provides both a match score and the positions where characters matched, which is essential for applications like fuzzy finders that need to highlight matching characters in results.

The package offers three main components: an async fuzzy match function for matching a query against a list of candidates, a fzy scorer for fuzzy string matching, and a substring scorer for exact substring matching. It has no runtime dependencies and supports Python 3.7 and later. The implementation is based on the original fzy algorithm and has been extracted from terminal fuzzy finder projects like sweep.py and vim-clap.

Use it for:

  • Build a fuzzy finder CLI tool that highlights matched characters in search results
  • Implement autocomplete or search filtering in a terminal application
  • Score and rank candidates in a list based on fuzzy query matching
  • Integrate fuzzy matching into an editor or IDE plugin
  • Filter file or command lists with user-friendly approximate matching

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides fuzzy string matching with match indices using the fzy algorithm, including async matching and substring scoring.

Yes, if you need fuzzy matching with character indices for a fuzzy finder or search interface. The zero-dependency install and permissive MIT license make it low-risk. However, the package is abandoned and has not been updated since January 2022, so consider it only for stable, self-contained use cases where you won't need ongoing maintenance or compatibility updates.

Install

pfzy on PyPI

pip

pip install pfzy

uv

uv add pfzy

poetry

poetry add pfzy

Installing pfzy

Before you install

Installation is straightforward with no runtime dependencies. However, the package has been abandoned since January 2022 (1659 days without release), so it will not receive bug fixes or maintenance updates.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.

Quickstart

pip install pfzy

import asyncio
from pfzy import fuzzy_match

result = asyncio.run(fuzzy_match("ab", ["acb", "acbabc"]))
print(result)

Requires Python >= 3.7; async/await syntax required to use the fuzzy_match function.

Verify before relying

  • Whether the fzy algorithm implementation remains competitive with newer fuzzy matching approaches
  • Whether async functionality provides meaningful performance gains for typical use cases
  • Compatibility with Python versions beyond 3.10 despite the stated support ceiling

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.7,<4.0)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 1,659 days since the last release
Last repo commit
First released
Downloads 16,565,697/month — #1,147 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: pfzy-0.3.4-py3-none-any.whl

Keywords: fuzzy, string, fzy, search, development

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MicrosoftOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software DevelopmentTopic :: Software Development :: Libraries

Tags

fuzzy string matchingfzy algorithm pythonfuzzy search with indicesasync fuzzy matcherfuzzy finder librarysubstring matching scorerfuzzy string scoring
fuzzy-matchingsearch-algorithmabandoned

More Software Development packages