skillfed

globmatch

Matching paths against globs

globmatch v2.0.0 131.7K downloads/30d#11,580 on PyPI10
Permissive license BSD-3 Abandoned released

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 globmatch

uv

uv add globmatch

poetry

poetry add globmatch

Installing 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

Intended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

glob pattern matchingpath matching without filesystemfnmatch with double starglob pattern validationpath glob matching library
pattern-matchingpath-utilities

More Utilities packages