MiniMindsLab Path Glob Filter
Pure-Python helpers to filter relative file paths by simple include/exclude glob rules with deterministic matching order.
Features
- Standard library only
- No filesystem access required
- Deterministic output ordering (input order preserved)
- Simple include/exclude glob rule handling
- Consistent path separator normalization (
\\->/)
Quick usage
from minimindslab_path_glob_filter import filter_paths
paths = [
"src/main.py",
"src/util/helpers.py",
"tests/test_main.py",
"README.md",
]
result = filter_paths(
paths,
include_patterns=["src/*.py", "src/**/*.py", "README.md"],
exclude_patterns=["src/util/*"],
)
print(result.matched) # ['src/main.py', 'README.md']
print(result.excluded) # ['src/util/helpers.py']
Matching semantics
- Patterns use
fnmatch-style glob syntax (*,?,[seq]). - Paths are treated as relative path strings.
- Backslashes are normalized to forward slashes for both paths and patterns.
- Include phase:
- If
include_patternsis empty, all input paths are initially included. - Otherwise, a path is initially included if it matches at least one include pattern.
- If
- Exclude phase:
- Any initially included path that matches an exclude pattern is moved to
excluded. - Exclusion takes precedence over inclusion.
- Any initially included path that matches an exclude pattern is moved to
- Output order follows original input order.
Testing
Run tests with:
python -m unittest discover -s tests -p "test*.py"
Metadata
Release files for minimindslab-path-glob-filter 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| minimindslab_path_glob_filter-0.1.0.tar.gz | 4.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| minimindslab_path_glob_filter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / minimindslab_path_glob_filter-0.1.0.tar.gz
| Download URL | minimindslab_path_glob_filter-0.1.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1617ddf7a7043f2220bdefd51b24b461c4ac33bf5c24a66a28a873e34e69d040
|
|
BLAKE2b-256 checksum How to use checksums |
a5813eea46f00c3dc009e88974d5de8b59aba38687fe6b6f959b7d4e4ca7613a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Release files / minimindslab_path_glob_filter-0.1.0-py3-none-any.whl
| Download URL | minimindslab_path_glob_filter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8669eec67e952921de2366f6916867596b6ec68e79a58c1c29379cc05e3a0c48
|
|
BLAKE2b-256 checksum How to use checksums |
7e8273d862971b2c5e76d5e09c2439efc15a4a6394f3edc8315c24b9abb50b78
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
n8n
|
Security for minimindslab-path-glob-filter 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.