Registry / devops / igittigitt

igittigitt

JSON →
library2.1.5pypypi✓ verified 79d ago

A spec-compliant gitignore parser for Python. It loads .gitignore rules and provides a matcher to check if a path is ignored. Current version 2.1.5, requires Python >=3.8.0. Active development on GitHub.

pip install igittigitt
INSTALL
IMPORT
SIG · IGITTIGITT
I
igittigitt
devopspythonv2.1.5
Install
3.0s avg
Import
Disk
32MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 33MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.0s · import 0.000s · 34MB
32MB installed
● package 32MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IgnoreParser
from igittigitt import IgnoreParser
from igittigitt import IgnoreRules
IncludeParser
from igittigitt import IncludeParser
igittigitt
from igittigitt import igittigitt

Create IgnoreRules, add rules, and test paths.

from igittigitt import IgnoreRules rules = IgnoreRules() rules.parse_rule_string('*.pyc') assert rules.is_ignored('foo.pyc') == True
Debug
Known issues
gotchaIgnoreRules.is_ignored expects a path relative to the gitignore rules, not an absolute path. Using absolute paths may produce incorrect results.
fix
Provide relative paths, e.g., 'src/main.py' instead of '/home/user/project/src/main.py'.
affects: all
gotchaPattern matching behavior differs from git: igittigitt does not handle negated patterns (leading '!') correctly in all edge cases. Double-check complex .gitignore files.
fix
Test your patterns with both igittigitt and git check-ignore to ensure consistency.
affects: <2.2.0 (if released)
deprecatedThe function 'parse_gitignore' returns a dict, not an IgnoreRules object. Many users expect IgnoreRules from it.
fix
Use IgnoreRules directly: rules = IgnoreRules(); rules.parse_file('.gitignore').
affects: all
Upgrade
Version history
2.1.5latest on PyPI · released Oct 16, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
igittigitt — pip install igittigitt · libregistry