skillfed

ignore-python

Python bindings for the Rust crate ignore

ignore-python v0.4.1 189.6K downloads/30d#9,925 on PyPI14
License unclear Active released

What it is and what it does

ignore-python is a Python binding to the Rust ignore crate, the same filtering engine used by ripgrep and fd. It lets you walk a directory tree recursively while automatically respecting .gitignore, .ignore files, and glob patterns—filtering out matching files and directories without you having to parse those rules yourself. By default it also skips hidden files and directories, though this can be toggled.

The package ships as a compiled extension (wheels for CPython and PyPy across Linux, macOS, and Windows architectures), so installation is straightforward on supported platforms. It exposes a simple Walk class for basic traversal and a WalkBuilder for more control over filtering behavior. Since it delegates the actual filtering to Rust code, it should be faster than pure-Python directory walkers that re-implement gitignore logic.

Use it for:

  • Build a project indexer or code search tool that respects .gitignore rules without reimplementing them
  • Recursively find files matching patterns while automatically excluding ignored paths in a build or lint tool
  • Walk a large directory tree efficiently while filtering based on .gitignore and custom ignore files
  • Migrate from ripgrep or fd's ignore logic to Python when you need the same filtering semantics in application code

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides fast recursive directory traversal with automatic filtering based on .gitignore, .ignore files, and glob patterns by binding to the Rust ignore crate.

Yes, if you need gitignore-aware directory traversal and your platform has a compatible wheel. The package is actively maintained, has no known vulnerabilities, and solves a real problem (respecting ignore rules) that is tedious to reimplement. The main caveat is that the license is undocumented—verify the actual license terms before committing to a dependency.

Install

ignore-python on PyPI

pip

pip install ignore-python

uv

uv add ignore-python

poetry

poetry add ignore-python

Installing ignore-python

Before you install

Medium install friction due to compiled wheels for multiple platforms and architectures; actively maintained with recent releases and a live repository.

License in practice

License treatment is unclear—no SPDX identifier or raw license text is documented in the package metadata, so you should verify the actual license terms before use.

Quickstart

pip install ignore-python

from ignore import Walk

for entry in Walk("./"):
    print(entry.path())

Requires Python >=3.9; compiled wheels are provided for many platforms but may require a compatible architecture.

Verify before relying

  • Actual license terms and conditions—metadata shows no SPDX or raw license field
  • Whether WalkBuilder and other advanced APIs are production-ready or still evolving
  • Performance characteristics compared to standard os.walk or pathlib alternatives

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.9)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 44 days since the last release
Last repo commit
First released
Downloads 189,624/month — #9,925 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: ignore_python-0.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; ignore_python-0.4.1-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; ignore_python-0.4.1-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; ignore_python-0.4.1-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl; ignore_python-0.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; ignore_python-0.4.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl; ignore_python-0.4.1-cp310-cp310-musllinux_1_2_aarch64.whl; ignore_python-0.4.1-cp310-cp310-musllinux_1_2_armv7l.whl; ignore_python-0.4.1-cp310-cp310-musllinux_1_2_i686.whl; ignore_python-0.4.1-cp310-cp310-musllinux_1_2_x86_64.whl; ignore_python-0.4.1-cp310-cp310-win_amd64.whl; ignore_python-0.4.1-cp311-cp311-macosx_10_12_x86_64.whl; ignore_python-0.4.1-cp311-cp311-macosx_11_0_arm64.whl; ignore_python-0.4.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; ignore_python-0.4.1-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; ignore_python-0.4.1-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; ignore_python-0.4.1-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl; ignore_python-0.4.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; ignore_python-0.4.1-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl; ignore_python-0.4.1-cp311-cp311-musllinux_1_2_aarch64.whl

Keywords: python, gitignore, search, rust, extension, module, filesystem, recursively-search, fd, ripgrep, ignore

Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust

Tags

gitignore-aware directory traversalfast recursive file filteringignore glob patterns pythonripgrep ignore bindingsfilesystem walk with gitignore
filesystem-traversalrust-binding

More Utilities packages