{"library":"rignore","title":"rignore","description":"rignore is a Python module that provides high-performance, Rust-powered file system traversal functionality. It efficiently walks through directories while respecting various ignore rules, such as those found in `.gitignore` files. It wraps the Rust `ignore` crate using PyO3, offering a fast and customizable API. The current version is 0.7.6, with a relatively active release cadence.","status":"active","version":"0.7.6","language":"en","source_language":"en","source_url":"https://github.com/patrick91/rignore","tags":["file system","ignore","gitignore","rust","performance","traversal"],"install":[{"cmd":"pip install rignore","lang":"bash","label":"Install rignore"}],"dependencies":[],"imports":[{"note":"The primary function `walk` is directly available, though `import rignore` and `rignore.walk` also works. There is no `walk_files` method in the current API.","wrong":"import rignore; rignore.walk_files()","symbol":"walk","correct":"from rignore import walk"}],"quickstart":{"code":"import rignore\nimport os\n\n# Create a dummy directory structure for demonstration\nos.makedirs('my_project/src', exist_ok=True)\nos.makedirs('my_project/build', exist_ok=True)\nwith open('my_project/.gitignore', 'w') as f:\n    f.write('*.tmp\\n')\n    f.write('/build/\\n')\nwith open('my_project/src/main.py', 'w') as f: pass\nwith open('my_project/src/temp.tmp', 'w') as f: pass\nwith open('my_project/build/output.log', 'w') as f: pass\n\nprint('Files found by rignore.walk:')\nfor file_path in rignore.walk('my_project'):\n    print(file_path)\n\n# Clean up (optional)\nimport shutil\nshutil.rmtree('my_project')","lang":"python","description":"This quickstart demonstrates how to use `rignore.walk` to traverse a directory while respecting a `.gitignore` file. It creates a temporary directory structure and then prints the paths of files not ignored."},"warnings":[{"fix":"Understand that `overrides` are powerful and take precedence. Use them specifically when you want to invert or drastically alter the default ignore behavior. For adding simple extra ignore patterns, prefer `additional_ignores`.","message":"The `overrides` parameter acts as a whitelist. If provided, only files matching these override patterns (and not explicitly excluded by a `!` in an override) will be included, effectively ignoring all other ignore rules (like `.gitignore`) unless re-included by the overrides. This can lead to unexpected file exclusions if not carefully constructed.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Carefully review the interaction between `.gitignore` files in the directory hierarchy and any programmatic `additional_ignores` or `overrides` you supply. Test your ignore patterns thoroughly to ensure the correct files are being processed.","message":"By default, `rignore.walk` respects standard `.gitignore` files. If you also provide `additional_ignores` or `read_git_ignore=True`, be mindful of potential redundancies or conflicting rules, especially if you expect certain files to be ignored that are later re-included by less specific `additional_ignores`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-05T00:00:00.000Z","next_check":"2026-07-04T00:00:00.000Z"}