globmatch
Matching paths against globs
What it is and what it does
globmatch provides pure-Python path-to-glob matching without touching the filesystem. Unlike the standard library's glob module (which searches disk) or fnmatch (which lacks `**` support), globmatch evaluates whether a given path string matches one or more glob patterns. The `**` pattern matches zero or more directory levels, while `*` matches characters within a single path component. This is useful for filter logic, inclusion/exclusion rules, and pattern validation in applications that don't need filesystem traversal.
The package depends only on backports.functools-lru-cache for memoization and installs as a pure wheel with no compiled dependencies. However, it has been abandoned since its latest release on 2021-01-07 with no recent updates or maintenance.
Use it for:
- Filter file paths in build tools or linters against inclusion/exclusion patterns without scanning disk
- Validate whether a given path matches a gitignore-like pattern set in configuration
- Implement path matching logic in package managers or dependency resolvers
- Test glob patterns programmatically without creating temporary files
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Matches file paths against glob patterns without filesystem access, supporting `**` for multi-level directory matching and `*` for single-level wildcards.
Yes, if you need pure-Python glob matching without filesystem access and can accept an unmaintained package. The code is simple, has no known vulnerabilities, and the API is stable. Install only if you are comfortable maintaining a fork or if the pattern-matching logic is unlikely to need updates. Not recommended for new projects expecting active support.
Install
globmatch on PyPI
pip
pip install globmatchuv
uv add globmatchpoetry
poetry add globmatchInstalling globmatch
Before you install
Low install friction with a single lightweight runtime dependency. However, the package is abandoned—last release was 2021-01-07, with no active maintenance since then.
License in practice
Licensed under BSD-3 (permissive), imposing no restrictions on commercial or private use; attribution required.
Quickstart
pip install globmatch
from globmatch import glob_match
glob_match('foo/config', ['**/config']) # Returns True
Verify before relying
- Whether the package works reliably on modern Python versions beyond those listed in classifiers
- Performance characteristics with large path sets or deeply nested patterns
- Whether backports.functools-lru-cache is actually required at runtime or only for older Python
Package facts
| License | BSD-3 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — backports.functools-lru-cache |
| Maintenance | abandoned — 2,045 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 131,660/month — #11,580 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: globmatch-2.0.0-py2.py3-none-any.whl
Keywords: glob, fnmatch, matching
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
dpathdpath lets you access, search, and modify…
permissive · top 5,000 on PyPI
formic2Formic implements Apache Ant FileSet and glob…
copyleft · top 5,000 on PyPI
wcmatchwcmatch provides enhanced file pattern matching…
permissive · top 1,000 on PyPI
glob2glob2 extends Python's built-in glob module…
permissive · top 5,000 on PyPI
gitmatchGitmatch implements gitignore-style pattern…
permissive · top 15,000 on PyPI
pathtoolsProvides pattern matching and utility functions…
permissive · top 15,000 on PyPI
ignore-pythonProvides fast recursive directory traversal…
unclear · top 15,000 on PyPI
py-walkFilters filesystem paths using gitignore-style…
permissive · top 5,000 on PyPI
scantreeRecursively scans directories with flexible…
permissive · top 5,000 on PyPI
findlibsLocates shared libraries on the system by…
permissive · top 5,000 on PyPI