pfzy - Fuzzy String Matching

0.3.4 · active · verified Thu Apr 09

pfzy is a Python port of the fzy fuzzy string matching algorithm, designed for efficient and accurate fuzzy searching primarily in fuzzy finder applications. It provides asynchronous fuzzy match functions, a fzy scorer, and a substring scorer that can calculate matching scores and provide corresponding indices. The library is currently at version 0.3.4 and supports Python versions `>=3.7,<4.0`. While the last PyPI release was in January 2022, its continued inclusion and updates in distributions like Arch Linux (up to January 2026) suggest it remains an active and relevant tool for specific fuzzy matching needs.

Warnings

Install

Imports

Quickstart

Demonstrates how to use the `fuzzy_match` function asynchronously to find fuzzy matches and their indices from a list of options based on a given query.

import asyncio
from pfzy import fuzzy_match

async def main():
    options = ["apple", "banana", "apricot", "grape"]
    query = "ap"
    results = await fuzzy_match(query, options)
    print(results)

if __name__ == "__main__":
    asyncio.run(main())

view raw JSON →