pfzy
Python port of the fzy fuzzy string matching algorithm
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 pfzyuv
uv add pfzypoetry
poetry add pfzyInstalling 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
fuzzyfinderFuzzy finder that matches partial strings from…
permissive · top 15,000 on PyPI
fuzzywuzzyFuzzyWuzzy performs fuzzy string matching using…
copyleft · top 5,000 on PyPI
thefuzzTheFuzz performs fuzzy string matching using…
permissive · top 5,000 on PyPI
scikit-fuzzyscikit-fuzzy provides fuzzy logic algorithms…
unclear · top 15,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
pyfzfpyfzf wraps the fzf command-line fuzzy finder,…
permissive · top 15,000 on PyPI
pysimstringProvides fast approximate string matching and…
unclear · top 15,000 on PyPI
tfidf-matcherPerforms fast fuzzy string matching on large…
permissive · top 15,000 on PyPI
suffix-treesImplements suffix trees and generalized suffix…
permissive · top 15,000 on PyPI
phoneticsComputes phonetic keys of strings using…
permissive · top 15,000 on PyPI