Registry / serialization / globre

globre

JSON →
library0.1.5pypypi✓ verified 85d ago

A glob matching library providing an interface similar to the `re` module. Version 0.1.5 is latest. The library appears to be in maintenance mode with infrequent releases.

pip install globre
INSTALL
IMPORT
SIG · GLOBRE
G
globre
serializationpythonv0.1.5
Install
2.4s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.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 · 19.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.4s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

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

globre
import globre
from globre import globre
globre is a top-level module, not a submodule.

Basic usage: import globre and use match() like re.match().

import globre # Match a glob pattern if globre.match('*.py', 'test.py'): print('matches')
Debug
Known issues
gotchaCommon mistake: treat globre.match() like Python's fnmatch. globre.match() behaves like re.match (anchored at start) but with glob syntax. To match anywhere use globre.search().
fix
Use globre.search() for partial matches, globre.match() for anchored start.
affects: all
gotchaPattern syntax: globre uses standard glob patterns (like **, *, ?, [...]) not regex. Escaping special regex characters is not needed, but glob special characters must be escaped. This confusion often leads to errors.
fix
Remember: it's glob syntax, not regex. Use bracket patterns like [abc] for character sets, * for any string, ? for single char.
affects: all
Errors
Common errors & fixes
AttributeError: module 'globre' has no attribute 'compile'
globre does not implement a compile() function; it provides match, search, etc. directly.
fix
Use globre.match(pattern, string) directly; no compile step needed.
SyntaxError: invalid syntax (when using '**' in pattern)
User mistakenly used '**' in a context where Python interprets it as exponentiation (e.g., inside an f-string or without quotes).
fix
Always pass patterns as strings: globre.match('**/*.py', 'src/mod.py')
Upgrade
Version history
0.1.5latest on PyPI · released Oct 29, 2016
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
globre — pip install globre · libregistry