{"id":19019446,"url":"https://github.com/kazhala/pfzy","last_synced_at":"2025-08-05T18:06:33.600Z","repository":{"id":57452093,"uuid":"397509864","full_name":"kazhala/pfzy","owner":"kazhala","description":"Python port of the fzy fuzzy string matching algorithm.","archived":false,"fork":false,"pushed_at":"2022-01-28T02:27:25.000Z","size":105,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-10T18:13:56.132Z","etag":null,"topics":["fuzzy-finds","fuzzy-search","fzf","fzy","string-matching"],"latest_commit_sha":null,"homepage":"https://pfzy.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kazhala.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-18T07:20:48.000Z","updated_at":"2025-05-15T01:33:57.000Z","dependencies_parsed_at":"2022-09-02T06:44:02.567Z","dependency_job_id":null,"html_url":"https://github.com/kazhala/pfzy","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kazhala/pfzy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhala%2Fpfzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhala%2Fpfzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhala%2Fpfzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhala%2Fpfzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kazhala","download_url":"https://codeload.github.com/kazhala/pfzy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kazhala%2Fpfzy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259718333,"owners_count":22901180,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fuzzy-finds","fuzzy-search","fzf","fzy","string-matching"],"created_at":"2024-11-08T20:12:28.265Z","updated_at":"2025-06-13T20:40:20.493Z","avatar_url":"https://github.com/kazhala.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# pfzy\n\n[![CI](https://github.com/kazhala/pfzy/workflows/CI/badge.svg)](https://github.com/kazhala/pfzy/actions?query=workflow%3ACI)\n[![Docs](https://img.shields.io/readthedocs/pfzy?label=Docs\u0026logo=Read%20the%20Docs)](https://readthedocs.org/projects/pfzy/)\n[![Build](https://codebuild.ap-southeast-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiT2pwUFo2MVBzV1ptL0d4VDhmSHo4bSswVHFuaEh6bEU1d2g3bmpsdnZjSzcwWkxac3NHcjBKZDkyT2t1R0VveHJ0WlNFWmZmUjNQUGFpemxwV2loRm9rPSIsIml2UGFyYW1ldGVyU3BlYyI6Imw4dlcwYjlxaU9kYVd0UkoiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D\u0026branch=master)](https://ap-southeast-2.console.aws.amazon.com/codesuite/codebuild/378756445655/projects/pfzy/history?region=ap-southeast-2\u0026builds-meta=eyJmIjp7InRleHQiOiIifSwicyI6e30sIm4iOjIwLCJpIjowfQ)\n[![Coverage](https://img.shields.io/coveralls/github/kazhala/pfzy?logo=coveralls)](https://coveralls.io/github/kazhala/pfzy?branch=master)\n[![Version](https://img.shields.io/pypi/pyversions/pfzy)](https://pypi.org/project/pfzy/)\n[![PyPi](https://img.shields.io/pypi/v/pfzy)](https://pypi.org/project/pfzy/)\n[![License](https://img.shields.io/pypi/l/pfzy)](https://github.com/kazhala/pfzy/blob/master/LICENSE)\n\n\u003c!-- start elevator-pitch-intro --\u003e\n\nPython port of the [fzy](https://github.com/jhawthorn/fzy) fuzzy string matching algorithm.\n\n- [Async fuzzy match function](https://pfzy.readthedocs.io/en/latest/pages/usage.html#matcher)\n- [Fzy scorer (fuzzy string match)](https://pfzy.readthedocs.io/en/latest/pages/usage.html#fzy-scorer)\n- [Substring scorer (exact substring match)](https://pfzy.readthedocs.io/en/latest/pages/usage.html#substr-scorer)\n\n## Requirements\n\n```\npython \u003e= 3.7\n```\n\n## Installation\n\n```sh\npip install pfzy\n```\n\n## Quick Start\n\n**Full documentation: [https://pfzy.readthedocs.io/](https://pfzy.readthedocs.io/)**\n\n```python\nimport asyncio\n\nfrom pfzy import fuzzy_match\n\nresult = asyncio.run(fuzzy_match(\"ab\", [\"acb\", \"acbabc\"]))\n```\n\n```\n\u003e\u003e\u003e print(result)\n[{'value': 'acbabc', 'indices': [3, 4]}, {'value': 'acb', 'indices': [0, 2]}]\n```\n\n\u003c!-- end elevator-pitch-intro --\u003e\n\n## Background\n\n[fuzzywuzzy](https://github.com/seatgeek/fuzzywuzzy) is a famous python package for performing fuzzy matching\nbetween strings powered by [python-Levenshtein](https://github.com/miohtama/python-Levenshtein). While it does its\njob well it doesn't calculate/provide the matching indices which is essential in a fuzzy finder applications.\n\nThe [fzy](https://github.com/jhawthorn/fzy) fuzzy matching algorithm can calculate the matching score while also\nproviding the matching indices which fuzzy finder applications can use to provide extra highlights.\n\nThe initial implementation of this algorithm can be found at [sweep.py](https://github.com/aslpavel/sweep.py) which\nis a python implementation of the terminal fuzzy finder. The code snippet is later used by the project [vim-clap](https://github.com/liuchengxu/vim-clap).\n\n**I found myself needing this logic across multiple projects hence decided to strip out the logic and publish a dedicated\npackage with detailed documentation and unittest.**\n\n\u003c!-- start elevator-pitch-ending --\u003e\n\n## Credit\n\n- [fzy](https://github.com/jhawthorn/fzy)\n- [sweep.py](https://github.com/aslpavel/sweep.py)\n- [vim-clap](https://github.com/liuchengxu/vim-clap)\n\n## LICENSE\n\n\u003e All 3 projects mentioned in [Credit](#credit) are all licensed under [MIT](https://opensource.org/licenses/MIT).\n\nThis project is licensed under [MIT](https://github.com/kazhala/pfzy). Copyright (c) 2021 Kevin Zhuang\n\n\u003c!-- end elevator-pitch-ending --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazhala%2Fpfzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkazhala%2Fpfzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkazhala%2Fpfzy/lists"}