Installation¶
searchpath requires Python 3.10 or later.
Basic installation¶
Dependencies¶
searchpath has minimal dependencies to keep your dependency tree lean:
| Package | Purpose |
|---|---|
| typing-extensions | Backports of typing features for Python < 3.12 |
Optional dependencies¶
gitignore patterns¶
For full gitignore-style pattern matching via the GitignoreMatcher class, install with the extra:
This adds the pathspec library, which provides full gitignore compatibility including negation patterns (!pattern), directory-only patterns (pattern/), and anchored patterns (/pattern).
When to use GitignoreMatcher
The default GlobMatcher handles most use cases. Use GitignoreMatcher when you need:
- Negation patterns to un-ignore previously matched paths
- Directory-only patterns that match only directories
- Anchored patterns that match from the root only
- Full gitignore file compatibility
Install from repository¶
To install the latest development version directly from GitHub: