iterfzf: Pythonic interface to
See also the API reference.
- No dependency but only Python is required. Prebuilt
fzfbinary for each platform is bundled into wheels. Everything is ready by
pip install iterfzf. (Note that not wheels of all supported platforms are uploaded to PyPI as they don't allow minor platforms e.g. FreeBSD. The complete wheels can be found from the GitHub releases.)
- Consumes an iterable rather than a list. It makes UX way better when the input data is long but streamed from low latency network. It can begin to display items immediately after only part of items are ready, and before the complete items are ready.
- Supports Python 2.6, 2.7, 3.3 or higher.
Consumes the given
iterable of strings, and displays them using
If a user chooses something it immediately returns the chosen things.
The following is the full list of parameters. Please pass them as
keyword arguments except for
iterable which comes first:
The only required parameter. Every element which this
iterableyields is displayed immediately after each one is produced. In other words, the passed
iterableis lazily consumed.
It can be an iterable of byte strings (e.g.
[b'foo', b'bar']) or of Unicode strings (e.g.
[u'foo', u'bar']), but must not be mixed (e.g.
[u'foo', b'bar']). If they are byte strings the function returns bytes. If they are Unicode strings it returns Unicode strings. See also the
Trueto let the user to choose more than one. A user can select items with tab/shift-tab. If
multi=Truethe function returns a list of strings rather than a string.
Falseto make a user possible to choose only one. If
multi=Falseit returns a string rather than a list.
For both modes, the function returns
Noneif nothing is matched or a user cancelled.
Truethe return type is a tuple where the first element is the query the user actually typed, and the second element is the selected output as described above and depending on the state of
New in version 0.3.0.
The text encoding name (e.g.
'ascii') to be used for encoding
iterablevalues and decoding return values. It's ignored when the
iterablevalues are byte strings.
The Python's default encoding (i.e.
sys.getdefaultencoding()) is used by default.
Truefor extended-search mode.
Falseto turn it off.
Falsefor fuzzy matching, and
Truefor exact matching.
Truefor case sensitivity, and
Falsefor case insensitivity.
None, the default, for smart-case match.
The query string to be filled at first. (It can be removed by a user.)
Empty string by default.
The prompt sequence.
' >'by default.
Falseto disable mouse.
Author and license
fzf program is written by Junegunn Choi and distributed under
iterfzf does not follow Semantic Versioning. The version
consists of its own major and minor number followed by the version of bundled
fzf. For example, 188.8.131.52.5 means that
iterfzf's own major version
is 1, and its own minor version is 2, plus the version of
fzf it bundles
/---------- 1. iterfzf's major version | /------ 3. bundled fzf's major version | | /-- 5. bundled fzf's patch version | | | v v v 184.108.40.206.5 ^ ^ | | | \---- 4. bundled fzf's minor version \-------- 2. iterfzf's minor version
Released on December 4, 2017. Bundles
Released on October 19, 2017. Bundles
- Added missing binary wheels for macOS again. (These were missing from 0.3.0.17.1, the previous release.)
Released on October 16, 2017. Bundles
print_queryoption. [#1 by George Kettleborough]
Released on August 27, 2017. Bundles
Released on July 23, 2017. Bundles
Released on July 23, 2017. Bundles
Released on June 6, 2017. Bundles
fzffrom 0.16.7 to 0.16.8.
Released on May 20, 2017. Bundles
- Made sdists (source distributions) possible to be correctly installed
so that older
pip, can't deal with wheels, also can install
Released on May 19, 2017. Bundles
fzf 0.16.7. The initial release.