{"id":13501779,"url":"https://github.com/dahlia/iterfzf","last_synced_at":"2025-05-15T09:07:30.480Z","repository":{"id":53158323,"uuid":"91645860","full_name":"dahlia/iterfzf","owner":"dahlia","description":"Pythonic interface to fzf, a CLI fuzzy finder","archived":false,"fork":false,"pushed_at":"2025-05-10T14:36:02.000Z","size":154,"stargazers_count":178,"open_issues_count":13,"forks_count":21,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-10T14:55:51.857Z","etag":null,"topics":["cli","fuzzy-search","fzf","python","python2","python3"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/iterfzf","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dahlia.png","metadata":{"files":{"readme":"README.rst","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-18T03:43:23.000Z","updated_at":"2025-05-10T14:36:06.000Z","dependencies_parsed_at":"2023-11-14T00:32:09.121Z","dependency_job_id":"c1b2669e-ef8d-4b22-b04c-c886dba2b191","html_url":"https://github.com/dahlia/iterfzf","commit_stats":{"total_commits":62,"total_committers":5,"mean_commits":12.4,"dds":0.09677419354838712,"last_synced_commit":"d030d71a6748b8507735458e0acadcddc7a6cd01"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fiterfzf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fiterfzf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fiterfzf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Fiterfzf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dahlia","download_url":"https://codeload.github.com/dahlia/iterfzf/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254310515,"owners_count":22049469,"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":["cli","fuzzy-search","fzf","python","python2","python3"],"created_at":"2024-07-31T22:01:50.060Z","updated_at":"2025-05-15T09:07:25.460Z","avatar_url":"https://github.com/dahlia.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"``iterfzf``: Pythonic interface to ``fzf``\n==========================================\n\n.. image:: https://img.shields.io/pypi/v/iterfzf\n   :target: https://pypi.org/project/iterfzf/\n   :alt: Latest PyPI version\n\n.. image:: https://github.com/dahlia/iterfzf/actions/workflows/test.yaml/badge.svg\n   :alt: Build status (GitHub Actions)\n   :target: https://github.com/dahlia/iterfzf/actions/workflows/test.yaml\n\n\nDemo session\n------------\n\n.. image:: https://asciinema.org/a/121028.png\n   :target: https://asciinema.org/a/121028\n   :alt: iterfzf demo session\n\nSee also the `API reference`_.\n\n\nKey features\n------------\n\n- No dependency but only Python is required.  Prebuilt ``fzf`` binary for\n  each platform is bundled into wheels.  Everything is ready by\n  ``pip install iterfzf``.  (Note that not wheels of all supported platforms\n  are uploaded to PyPI as they don't allow minor platforms e.g. FreeBSD.\n  The complete wheels can be found from the `GitHub releases`__.)\n- Consumes an iterable rather than a list.  It makes UX way better when the\n  input data is long but *streamed* from low latency network.\n  It can begin to display items immediately after only *part* of items are\n  ready, and *before* the complete items are ready.\n- Supports Python 3.8 or higher.\n\n__ https://github.com/dahlia/iterfzf/releases\n\n\n.. _api reference:\n\n``iterfzf.iterfzf(iterable, *, **options)``\n-------------------------------------------\n\nConsumes the given ``iterable`` of strings, and displays them using ``fzf``.\nIf a user chooses something it immediately returns the chosen things. If the\nuser cancels the selection, the `KeywordInterrupt` exception will be raised.\n\nThe following is the full list of parameters.  Pass them as\n**keyword arguments** except for ``iterable`` which comes first:\n\n``iterable`` (required)\n   The only required parameter.  Every element which this ``iterable`` yields\n   is displayed immediately after each one is produced.  In other words,\n   the passed ``iterable`` is lazily consumed.\n\n   It can be an iterable of byte strings (e.g. ``[b'foo', b'bar']``) or of\n   Unicode strings (e.g. ``[u'foo', u'bar']``), but must not be\n   mixed (e.g. ``[u'foo', b'bar']``).  If they are byte strings the function\n   returns bytes.  If they are Unicode strings it returns Unicode strings.\n   See also the ``encoding`` parameter.\n\n.. list-table:: Keyword arguments\n   :widths: 12 12 12 50\n   :header-rows: 1\n\n   * - Keyword\n     - Default\n     - CLI option\n     - Description\n   * - ``ansi``\n     - ``None``\n     - ``--ansi``\n     - ``True`` to enable ansi colors mode.\n\n       *New in version 1.0.0.*\n   * - ``bind``\n     -\n     - ``--bind``\n     - The key/event bindings to pass to ``fzf``.\n\n       Dictionary of the form {KEY: ACTION} or {EVENT: ACTION}.\n\n       *New in version 1.4.0.*\n   * - ``case_sensitive``\n     - ``None``\n     - ``--smart-case``\n     - ``True`` for case sensitivity, and ``False`` for case insensitivity.\n       ``None``, the default, for smart-case match.\n\n       ``True`` corresponds to ``+i`` option and ``False`` corresponds to\n       ``-i`` option.\n   * - ``color``\n     - ``None``\n     - ``--color``\n     - Accepts color scheme name or a dictionary in the form of {element:\n       color}.\n\n       *New in version 1.6.0.*\n   * - ``cycle``\n     - ``False``\n     - ``--cycle``\n     - ``True`` to enable cycling scrolling.\n\n       *New in version 1.1.0.*\n   * - ``encoding``\n     - ``sys.getdefaultencoding()``\n     - ``--encoding``\n     - The text encoding name (e.g. ``'utf-8'``, ``'ascii'``) to be used for\n       encoding ``iterable`` values and decoding return values.  It's ignored\n       when the ``iterable`` values are byte strings.\n   * - ``exact``\n     - ``False``\n     - ``--exact``\n     - ``False`` for fuzzy matching, and ``True`` for exact matching.\n   * - ``extended``\n     - ``True``\n     - ``--extended``\n       ``--no-extended``\n     - ``True`` for extended-search mode.  ``False`` to turn it off.\n\n       ``True`` corresponds to ``-x``/``--extended`` option, and\n       ``False`` corresponds to ``+x``/``--no-extended`` option.\n   * - ``header``\n     - ``None``\n     - ``--header``\n     - Sticky header printed below prompt.\n\n       *New in version 1.6.0.*\n   * - ``mouse``\n     - ``True``\n     - ``--no-mouse``\n     -  ``False`` to disable mouse.\n   * - ``multi``\n     - ``False``\n     - ``--multi``\n     - ``True`` to let the user to choose more than one.  A user can select\n       items with tab/shift-tab.  If ``multi=True`` the function returns a list of\n       strings rather than a string.\n\n       ``False`` to make a user possible to choose only one.  If ``multi=False``\n       it returns a string rather than a list.\n\n       For both modes, the function returns ``None`` if nothing is matched.\n   * - ``preview``\n     - ``None``\n     - ``--preview``\n     - *New in version 0.5.0.*\n   * - ``print_query``\n     - ``False``\n     - ``--print-query``\n     - If ``True`` the return type is a tuple where the first element is the query\n       the user actually typed, and the second element is the selected output as\n       described above and depending on the state of ``multi``.\n\n       *New in version 0.3.0.*\n   * - ``prompt``\n     - ``\" \u003e\"``\n     - ``--prompt``\n     -\n   * - ``query``\n     - ``\"\"`` (empty string)\n     - ``--query``\n     - The query string to be filled at first.  (It can be removed by a user.)\n   * - ``sort``\n     - ``False``\n     - ``--sort``\n     - Sorts the result if ``True``.  ``False`` by default.\n\n       *New in version 1.3.0.*\n   * - ``__extra__``\n     - ``[]``\n     -\n     - The iterable of extra raw options/arguments to pass to ``fzf``.\n\n       This is how you pass extra options that are not already defined\n       as keyword arguments.\n\n       *New in version 1.1.0.*\n\n\nAuthor and license\n------------------\n\nThe ``iterfzf`` library is written by `Hong Minhee`__ and distributed under\nGPLv3_ or later.\n\nThe ``fzf`` program is written by `Junegunn Choi`__ and distributed under\nMIT license.\n\n__ https://hongminhee.org/\n.. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html\n__ https://junegunn.kr/\n\n\nChangelog\n---------\n\nVersioning scheme\n~~~~~~~~~~~~~~~~~\n\nNote that ``iterfzf`` does *not* follow `Semantic Versioning`_.  The version\nconsists of its own major and minor number followed by the version of bundled\n``fzf``.  For example, 1.2.3.4.5 means that ``iterfzf``'s own major version\nis 1, and its own minor version is 2, plus the version of ``fzf`` it bundles\nis 3.4.5.\n\n.. code-block:: text\n\n   /---------- 1. iterfzf's major version\n   |   /------ 3. bundled fzf's major version\n   |   |   /-- 5. bundled fzf's patch version\n   |   |   |\n   v   v   v\n   1.2.3.4.5\n     ^   ^\n     |   |\n     |   \\---- 4. bundled fzf's minor version\n     \\-------- 2. iterfzf's minor version\n\n.. _Semantic Versioning: http://semver.org/\n\n\nVersion 1.7.0.60.3\n~~~~~~~~~~~~~~~~~~\n\nTo be released.  Bundles ``fzf`` `0.60.3`__.\n\n__ https://github.com/junegunn/fzf/releases/tag/v0.60.3\n\n\nVersion 1.6.0.60.3\n~~~~~~~~~~~~~~~~~~\n\nReleased on March 11, 2025.  Bundles ``fzf`` `0.60.3`__.\n\n- Added ``header`` option.  [`#42`__ by Phred Lane]\n- Added ``color`` option.  [`#43`__ by Phred Lane]\n\n__ https://github.com/junegunn/fzf/releases/tag/v0.60.3\n__ https://github.com/dahlia/iterfzf/pull/42\n__ https://github.com/dahlia/iterfzf/pull/43\n\n\nVersion 1.5.0.60.2\n~~~~~~~~~~~~~~~~~~\n\nReleased on March 5, 2025.  Bundles ``fzf`` `0.60.2`__.\n\n- Added support for raising ``KeyboardInterrupt``.  [`#40`__ by Phred Lane]\n- Officially support Python 3.13.\n\n__ https://github.com/junegunn/fzf/releases/tag/v0.60.2\n__ https://github.com/dahlia/iterfzf/pull/40\n\n\nVersion 1.4.0.60.2\n~~~~~~~~~~~~~~~~~~\n\nReleased on March 1, 2025.  Bundles ``fzf`` `0.60.2`__.\n\n__ https://github.com/junegunn/fzf/releases/tag/v0.60.2\n\n\nVersion 1.4.0.54.3\n~~~~~~~~~~~~~~~~~~\n\nReleased on August 24, 2024.  Bundles ``fzf`` `0.54.3`__.\n\n__ https://github.com/junegunn/fzf/releases/tag/v0.54.3\n\n\nVersion 1.4.0.51.0\n~~~~~~~~~~~~~~~~~~\n\nReleased on May 7, 2024.  Bundles ``fzf`` `0.51.0`__.\n\n- Added ``bind`` option. [`#21`__, `#36`__ by Gregory.K]\n\n__ https://github.com/junegunn/fzf/releases/tag/0.51.0\n__ https://github.com/dahlia/iterfzf/issues/21\n__ https://github.com/dahlia/iterfzf/pull/36\n\n\nVersion 1.3.0.51.0\n~~~~~~~~~~~~~~~~~~\n\nReleased on May 6, 2024.  Bundles ``fzf`` `0.51.0`__.\n\n- Added ``sort`` option.  [`#18`__, `#35`__ by Gregory.K]\n- Officially support Python 3.12.\n\n__ https://github.com/junegunn/fzf/releases/tag/0.51.0\n__ https://github.com/dahlia/iterfzf/issues/18\n__ https://github.com/dahlia/iterfzf/pull/35\n\n\nVersion 1.2.0.46.1\n~~~~~~~~~~~~~~~~~~\n\nReleased on March 6, 2024.  Bundles ``fzf`` `0.46.1`__.\n\n- Close stdin before waiting to allow ``--select-1`` to work.\n  [`#34`__ by Alex Wood]\n\n__ https://github.com/junegunn/fzf/releases/tag/0.46.1\n__ https://github.com/dahlia/iterfzf/pull/34\n\n\nVersion 1.1.0.44.0\n~~~~~~~~~~~~~~~~~~\n\nReleased on November 18, 2023.  Bundles ``fzf`` `0.44.0`__.\n\n- Added ``cycle`` option.  [`#33`__ by Daniele Trifirò]\n- Added ``__extra__`` option.  [`#32`__]\n\n__ https://github.com/junegunn/fzf/releases/tag/0.44.0\n__ https://github.com/dahlia/iterfzf/pull/33\n__ https://github.com/dahlia/iterfzf/issues/32\n\n\nVersion 1.0.0.42.0\n~~~~~~~~~~~~~~~~~~\n\nReleased on September 18, 2023.  Bundles ``fzf`` `0.42.0`__.\n\n- Dropped Python 2.7, 3.5, 3.6, and 3.7 supports.\n- Officially support Python 3.8, 3.9, 3.10, and 3.11.\n- Dropped FreeBSD i386, Linux i686, Linux armv8l, OpenBSD i386, and Windows\n  32-bit supports as fzf no longer supports them.\n- Dropped OpenBSD amd64 support.\n- Except the first parameter ``iterable``, all parameters are enforced to be\n  keyword-only.  (Note that it's always been the recommended way to pass\n  options, although it was not enforced.)\n- Added ``ansi`` option.  [`#16`__ by Erik Lilja]\n- The ``executable`` parameter now takes ``os.PathLike`` instead of ``str``,\n  which is backward compatible.\n- Added ``__version__`` and ``__fzf_version__`` attributes to the module.\n- Added ``POSIX_EXECUTABLE_NAME`` and ``WINDOWS_EXECUTABLE_NAME`` attributes\n  to the module.\n- Module attribute ``EXECUTABLE_NAME`` is now a ``Literal['fzf', 'fzf.exe']``\n  type, which is backward compatible with the previous ``str`` type.\n- Module attribute ``BUNDLED_EXECUTABLE`` is now ``Optional[pathlib.Path]``\n  type.\n\n__ https://github.com/junegunn/fzf/releases/tag/0.42.0\n__ https://github.com/dahlia/iterfzf/pull/16\n\n\nVersion 0.5.0.20.0\n~~~~~~~~~~~~~~~~~~\n\nReleased on February 9, 2020.  Bundles ``fzf`` 0.20.0.\n\n- Dropped Python 2.6, 3.3, and 3.4 supports.\n- Officially support Python 3.7 (it anyway had worked though).\n- Marked the package as supporting type checking by following `PEP 561`_.\n- Added ``preview`` option.  [`#6`__ by Marc Weistroff]\n- Fixed a bug which had raised ``IOError`` by selecting an option before\n  finished to load all options on Windows.  [`#3`__ by Jeff Rimko]\n\n.. _PEP 561: https://www.python.org/dev/peps/pep-0561/\n__ https://github.com/dahlia/iterfzf/pull/6\n__ https://github.com/dahlia/iterfzf/pull/3\n\n\nVersion 0.4.0.17.3\n~~~~~~~~~~~~~~~~~~\n\nReleased on December 4, 2017.  Bundles ``fzf`` 0.17.3.\n\n\nVersion 0.4.0.17.1\n~~~~~~~~~~~~~~~~~~\n\nReleased on October 19, 2017.  Bundles ``fzf`` 0.17.1.\n\n- Added missing binary wheels for macOS again.  (These were missing from\n  0.3.0.17.1, the previous release.)\n\n\nVersion 0.3.0.17.1\n~~~~~~~~~~~~~~~~~~\n\nReleased on October 16, 2017.  Bundles ``fzf`` 0.17.1.\n\n- Added ``print_query`` option.  [`#1`__ by George Kettleborough]\n\n__ https://github.com/dahlia/iterfzf/pull/1\n\n\nVersion 0.2.0.17.0\n~~~~~~~~~~~~~~~~~~\n\nReleased on August 27, 2017.  Bundles ``fzf`` 0.17.0.\n\n\nVersion 0.2.0.16.11\n~~~~~~~~~~~~~~~~~~~\n\nReleased on July 23, 2017.  Bundles ``fzf`` 0.16.11.\n\n\nVersion 0.2.0.16.10\n~~~~~~~~~~~~~~~~~~~\n\nReleased on July 23, 2017.  Bundles ``fzf`` 0.16.10.\n\n\nVersion 0.2.0.16.8\n~~~~~~~~~~~~~~~~~~\n\nReleased on June 6, 2017.  Bundles ``fzf`` 0.16.8.\n\n- Upgraded ``fzf`` from 0.16.7 to 0.16.8.\n\n\nVersion 0.2.0.16.7\n~~~~~~~~~~~~~~~~~~\n\nReleased on May 20, 2017.  Bundles ``fzf`` 0.16.7.\n\n- Made sdists (source distributions) possible to be correctly installed\n  so that older ``pip``, can't deal with wheels, also can install ``iterfzf``.\n\n\nVersion 0.1.0.16.7\n~~~~~~~~~~~~~~~~~~\n\nReleased on May 19, 2017.  Bundles ``fzf`` 0.16.7.  The initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdahlia%2Fiterfzf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdahlia%2Fiterfzf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdahlia%2Fiterfzf/lists"}