ignore-python
Python bindings for the Rust crate ignore
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-pythonuv
uv add ignore-pythonpoetry
poetry add ignore-pythonInstalling 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
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
rignoreProvides fast directory traversal with support…
permissive · top 1,000 on PyPI
scantreeRecursively scans directories with flexible…
permissive · top 5,000 on PyPI
ripgrepProvides a Python interface to ripgrep (rg), a…
permissive · top 15,000 on PyPI
tensor-grepA high-performance grep-compatible command-line…
unclear · top 15,000 on PyPI
scandirProvides faster directory iteration and…
permissive · top 5,000 on PyPI
py-walkFilters filesystem paths using gitignore-style…
permissive · top 5,000 on PyPI
trailrunnerWalk filesystem paths while respecting…
permissive · top 5,000 on PyPI
ignoreDownloads and installs common .gitignore…
permissive · top 15,000 on PyPI
gitmatchGitmatch implements gitignore-style pattern…
permissive · top 15,000 on PyPI
formic2Formic implements Apache Ant FileSet and glob…
copyleft · top 5,000 on PyPI