gitignore-parser
A spec-compliant gitignore parser for Python 3.5+
Decision gist · record as of 2026-08-14
Yes, if you need to programmatically evaluate gitignore rules in Python. The package is stable, has no dependencies, supports a wide range of Python versions, and carries no known vulnerabilities. The long release interval and aging maintenance status are not blockers for a mature, single-purpose library, but you should verify that it handles your specific gitignore patterns correctly before relying on it in production.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- High install friction: the package has no runtime dependencies but has not been released in 354 days, and its status is marked as aging.
- The repository is not archived and has recent commits, but the long gap between releases may indicate limited active maintenance.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
last release 2025-08-25 (354 days) · last repo commit 2025-08-25 · 221 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,988,275 downloads/mo, #2,799 on PyPI
Alternatives
Verify before relying
from gitignore_parser import parse_gitignore
matches = parse_gitignore('/path/to/.gitignore')
if matches('/path/to/file.pyc'):
print('File is ignored')- Whether the package handles all edge cases of the gitignore spec (the description mentions it aims to be spec-compliant but does not detail which spec version or known limitations).
- Current test coverage and whether the aging maintenance status reflects active use or dormancy.
What it is and what it does
gitignore_parser is a Python library that reads .gitignore files and produces a callable matcher function. You pass it a gitignore file path or a string of gitignore rules, and it returns a function that you can call with file paths to determine whether they match the ignore patterns. The library claims to support the full gitignore spec, including features like square-bracket character classes (e.g., `*.py[cod]`) and top-level path anchors (e.g., `/...`), which the author notes are missing from some competing libraries.
The package has no runtime dependencies and supports Python 3.5 through 3.12. It was first released in 2018 and has been maintained sporadically; the most recent release was 354 days ago. The repository remains active with recent commits, but the long release interval suggests the package may be in a stable-but-not-actively-developed state.
Use it for
- Build tools and file processors that need to respect .gitignore rules when scanning project directories.
- Testing frameworks that want to exclude ignored files from test discovery or coverage reports.
- Version control utilities or scripts that programmatically check whether files should be tracked.
- Project analysis tools that need to filter out ignored paths when walking a directory tree.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to programmatically evaluate gitignore rules in Python.
The package is stable, has no dependencies, supports a wide range of Python versions, and carries no known vulnerabilities. The long release interval and aging maintenance status are not blockers for a mature, single-purpose library, but you should verify that it handles your specific gitignore patterns correctly before relying on it in production.
Install
gitignore-parser on PyPI
Before you install
High install friction: the package has no runtime dependencies but has not been released in 354 days, and its status is marked as aging. The repository is not archived and has recent commits, but the long gap between releases may indicate limited active maintenance.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.
Quickstart
from gitignore_parser import parse_gitignore
matches = parse_gitignore('/path/to/.gitignore')
if matches('/path/to/file.pyc'):
print('File is ignored')
Verify before relying
- Whether the package handles all edge cases of the gitignore spec (the description mentions it aims to be spec-compliant but does not detail which spec version or known limitations).
- Current test coverage and whether the aging maintenance status reflects active use or dormancy.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Aging 354 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,988,275 / month, #2,799 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules |
Evidence: gitignore_parser-0.1.13.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “gitignore file matcher”
- gitignore-parserParses .gitignore files and returns a callable matcher that tests…
- gitmatchGitmatch implements gitignore-style pattern matching for file paths,…
- gitignorantParses .gitignore files and matches file paths against the parsed…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also gitignorant · gitignorefile · igittigitt · py-walk · pathspec · gitmatch · trailrunner · rignore · ignore · ignore-python