A pure python implementation of fzf (fuzzyfinder) with some additional features using the curses library.
Project description
curses-fzf
About
A pure Python implementation of fzf (fuzzyfinder) using the curses library -
no external fzf binary required.
Although there are many good fzf libraries available, they all have one thing in common:
They are wrappers to the shell tool fzf.
This is not inherently bad, but has one major downside: It does not integrate well into Python code.
- What if you want to fuzzy-find over a list of dicts or objects?
- What if you want to pre-select items (e.g. tags already set for a resource, that could be unset while selecting new ones)?
- What if you want to display additional information along with the entry to fuzzy-find on?
- What if you want to customize the fuzzy-finder algorithm?
To all of the above questions this module is the answer.
What can it do?
It provides a curses-based TUI for fuzzy-searching lists of any item type. Perfect for CLI tools needing interactive filtering of user options.
It allows for single or multi select, preview functions, preselection of items and more. The module is designed to be highly customizable to fit your use-case: Provide your own scoring logic, remap keys or add your own functions to keybindings, change the color theme, ...
It is easy and straight-forward to use:
from curses_fzf import FuzzyFinder, CursesFzfAborted
data = ["apple", "banana", "grape", "orange", "watermelon"]
fzf = FuzzyFinder(multi=True)
try:
result = fzf.find(data)
except CursesFzfAborted:
print("Fuzzy finder aborted by user.")
else:
for item in result:
print(item)
See documentation - basic usage for further details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file curses_fzf-0.2.5.tar.gz.
File metadata
- Download URL: curses_fzf-0.2.5.tar.gz
- Upload date:
- Size: 108.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca65b4b73512ff2393e6c1e25baa4c45fa14f12fe23ddc6db192e583e830c82c
|
|
| MD5 |
f0b35e5f2bb5baa55a87af7bf3667e69
|
|
| BLAKE2b-256 |
dacead6d66df31c0b92a0a5180a4c0fa7fe29476986325bdde6c03d4934d2d08
|
Provenance
The following attestation bundles were made for curses_fzf-0.2.5.tar.gz:
Publisher:
pypi-publish.yml on Heiko-san/curses_fzf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curses_fzf-0.2.5.tar.gz -
Subject digest:
ca65b4b73512ff2393e6c1e25baa4c45fa14f12fe23ddc6db192e583e830c82c - Sigstore transparency entry: 1057514369
- Sigstore integration time:
-
Permalink:
Heiko-san/curses_fzf@dabc8909c814a713b29f5c76aee0d78a458029fc -
Branch / Tag:
refs/tags/0.2.5 - Owner: https://github.com/Heiko-san
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@dabc8909c814a713b29f5c76aee0d78a458029fc -
Trigger Event:
release
-
Statement type:
File details
Details for the file curses_fzf-0.2.5-py3-none-any.whl.
File metadata
- Download URL: curses_fzf-0.2.5-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e4afcc0b38d5bc77b1113578a3540b5e6f75ac80fe80c27971d0d8ca0219aee
|
|
| MD5 |
fbb70eac42b1f41408bf89c9511e4450
|
|
| BLAKE2b-256 |
7205789f4702b38a13cf2770b564704d1cdff34e751f77ebfbb91b43bf04ae19
|
Provenance
The following attestation bundles were made for curses_fzf-0.2.5-py3-none-any.whl:
Publisher:
pypi-publish.yml on Heiko-san/curses_fzf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
curses_fzf-0.2.5-py3-none-any.whl -
Subject digest:
0e4afcc0b38d5bc77b1113578a3540b5e6f75ac80fe80c27971d0d8ca0219aee - Sigstore transparency entry: 1057514377
- Sigstore integration time:
-
Permalink:
Heiko-san/curses_fzf@dabc8909c814a713b29f5c76aee0d78a458029fc -
Branch / Tag:
refs/tags/0.2.5 - Owner: https://github.com/Heiko-san
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@dabc8909c814a713b29f5c76aee0d78a458029fc -
Trigger Event:
release
-
Statement type: