{"id":21453,"library":"ignore-python","title":"ignore-python","description":"Python bindings for the Rust `ignore` crate, providing fast, parallel filesystem traversal with gitignore-style pattern matching. Currently at version 0.3.3, released periodically. Supports Python >=3.8.","status":"active","version":"0.3.3","language":"python","source_language":"en","source_url":"https://github.com/samuelcolvin/ignore-python","tags":["filesystem","gitignore","walk","pattern-matching"],"install":[{"cmd":"pip install ignore-python","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Python bindings rely on the Rust `ignore` crate; bundled in the package.","package":"ignore","optional":false}],"imports":[{"note":"Most classes are in submodules; direct `import ignore` gives you the top-level module, not the Rust bindings.","wrong":"import ignore","symbol":"Walk","correct":"from ignore import Walk"},{"note":"The class is called `Ignore`, not `GitIgnore`.","wrong":"from ignore import GitIgnore","symbol":"Ignore","correct":"from ignore import Ignore"},{"note":"IgnoreFilter is exposed at the top-level; there is no `filter` submodule.","wrong":"from ignore.filter import IgnoreFilter","symbol":"IgnoreFilter","correct":"from ignore import IgnoreFilter"},{"note":"`types` is a module, not a class; import it as a module to access enums like `FileType`.","wrong":"from ignore import Types","symbol":"types","correct":"from ignore import types"}],"quickstart":{"code":"from ignore import Walk\n\nwalker = Walk('./src', produce_gitignore=True)\nfor path in walker:\n    print(path)","lang":"python","description":"Walks the ./src directory, respecting .gitignore rules."},"warnings":[{"fix":"Use `path.resolve()` or join with root if absolute paths are needed.","message":"The `Walk` iterator yields `Path` objects relative to the root, not absolute paths.","severity":"gotcha","affected_versions":"all"},{"fix":"Pass `hidden=True` to include hidden files.","message":"Default behavior excludes hidden files (those starting with '.') unless `hidden=False` is passed.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `Ignore(patterns=['*.pyc', '__pycache__/'])` instead of `Ignore(match=['*.pyc'])`.","message":"The `Ignore` class constructor changed between 0.2.x and 0.3.x; now requires a `patterns` argument of type `List[str]`.","severity":"deprecated","affected_versions":">=0.3.0"},{"fix":"Replace `Walk(path, gitignore=True)` with `Walk(path, produce_gitignore=True)`.","message":"In version 0.3.0, the `Walk` class removed the `gitignore` parameter (use `produce_gitignore` instead).","severity":"breaking","affected_versions":">=0.3.0"}],"env_vars":null,"search_vec":"'0.3.3':25 '3.8':30 'bind':5 'crate':10 'current':22 'fast':12 'filesystem':14,31 'gitignor':18,32 'gitignore-styl':17 'ignor':2,9 'ignore-python':1 'match':21,36 'parallel':13 'pattern':20,35 'pattern-match':34 'period':27 'provid':11 'python':3,4,29 'releas':26 'rust':8 'style':19 'support':28 'travers':15 'version':24 'walk':33","created_at":"2026-04-27T16:59:58.727257+00:00","updated_at":"2026-04-27T16:59:58.727257+00:00","problems":[{"fix":"Use `from ignore import Ignore`.","cause":"The class is called `Ignore`, not `GitIgnore`.","error":"ImportError: cannot import name 'GitIgnore' from 'ignore'"},{"fix":"Use `Ignore(patterns=['*.pyc'])` instead of `Ignore(['*.pyc'])`.","cause":"The constructor signature changed in 0.3.0; `patterns` must be passed as a keyword argument.","error":"TypeError: Ignore() takes 1 positional argument but 2 were given"},{"fix":"Use `from ignore import Walk`.","cause":"`import ignore` gives the top-level module, not the Rust bindings.","error":"AttributeError: module 'ignore' has no attribute 'Walk'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.3.3","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/borsattoz/ignore-python","docs":"https://borsattoz.github.io/ignore-python","changelog":null,"pypi":"https://pypi.org/project/ignore-python/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","aws","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}