--- id: gitignorant version: "0.4.0" license: unclear license_treatment: permissive maintenance: dormant --- # gitignorant — A parser for gitignore files License: permissive · Maintenance: dormant · Downloads: 143.7K/mo ## What it is and what it does Gitignorant is a Python library that reads and parses .gitignore files, then matches file paths against the rules using the same semantics Git uses (last matching rule wins). It requires Python 3.7 or newer, includes full type hints, and has no runtime dependencies. The library handles single .gitignore files directly; hierarchical .gitignore trees (where different directories have their own .gitignore files) are not built in but can be implemented by calling code. You would use this when you need to programmatically determine whether a file should be ignored according to .gitignore rules—for example, in build tools, linters, or file synchronization utilities that need to respect the same ignore patterns as Git itself. Use it for: - Build tools or deployment scripts that need to exclude files matching .gitignore patterns - Linters or code analysis tools that should skip ignored files - File synchronization or backup utilities that respect .gitignore semantics - Testing frameworks that filter test files based on .gitignore rules ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Parses .gitignore files and matches file paths against the parsed rules using Git-compliant semantics. Yes, if you need to match files against .gitignore rules in Python code. The library is lightweight, has no dependencies, and carries a permissive license. Maintenance is dormant but the code is stable and unarchived; use it for straightforward single-file gitignore matching, but be aware that hierarchical .gitignore support requires custom integration. ## Install pip install gitignorant uv add gitignorant poetry add gitignorant ## Installing gitignorant Before you install: Low friction install with no runtime dependencies. Maintenance is dormant—last commit was 2025-01-03 and no release since 2024-11-01, but the repository remains active and unarchived. License in practice: MIT license (permissive) allows free use, modification, and distribution with minimal restrictions. Quickstart: from gitignorant import parse_gitignore_file rules = parse_gitignore_file('.gitignore') matches = rules.match('path/to/file.txt') Verify before relying: - Whether the implementation fully conforms to the gitignore spec or has known limitations beyond the stated lack of direct tree support - Performance characteristics on large .gitignore files or when matching many paths ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 143.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags gitignore parser, gitignore file matching, git ignore pattern matching, parse gitignore rules, gitignore compliance, file exclusion patterns, git-integration, file-filtering [View on SkillFed](https://skillfed.io/packages/gitignorant) · [View on PyPI](https://pypi.org/project/gitignorant/)