globmatch provides functions for matching a path against one or more glob patterns in Python. Unlike the standard library's `glob` module, it does not interact with the filesystem, focusing solely on generic string matching. It extends `fnmatch` capabilities by supporting the `**` pattern for matching zero or more directories. The current version is 2.0.0, with releases historically being infrequent but demonstrating active maintenance.
pip install globmatchVerified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage of `glob_match` with single and multiple patterns, including recursive matching with `**` and handling of dotfiles. The `match_all=True` parameter ensures all patterns are considered, enabling exclusion patterns.
Upgrade to `globmatch` 2.0.0 or higher. Thoroughly test existing glob patterns, especially those involving `**` on Windows paths or patterns targeting dotfiles, to ensure expected behavior.
If you intend to match files or directories nested deeply, use `**` (e.g., `some/path/**/*.txt`) instead of `*` (e.g., `some/path/*.txt`) for the recursive part.
If you need to find files on the filesystem that match a glob pattern, use Python's standard `glob` module (`glob.glob` or `pathlib.Path.glob`), ensuring `recursive=True` is set for `**` patterns.
Use the `**` wildcard for recursive matching across directories. Change the pattern to `['path/**/file']`.
If your goal is to find actual files on the filesystem, use Python's built-in `glob.glob()` or `pathlib.Path.glob()` functions. `globmatch` is for abstract path string matching.
Ensure you are using `globmatch` version `2.0.0` or newer. This version specifically addressed these compatibility and matching issues.
No dependency data recorded yet.